Skip to content

Deploy via REST API

The Free plan does not include API keys; they are on Pro and up.

  1. Create an org API key (sk_live_...) with the Agent role in Settings → Security
  2. Exchange it for a JWT via the auth API (it lasts 1 hour)
  3. Call the agent API with Authorization: Bearer <jwt> and X-Agent-Id

That token can start a run of its own agent and follow or stop it, and nothing else. See Authentication → for details and the full list.


Terminal window
curl -X POST https://agent-api.auteryn.ai/api/run \
-H "Authorization: Bearer eyJ..." \
-H "X-Agent-Id: your-agent-id" \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Summarize the open P1 bugs"}],"stream":true}'

When stream: true, the response is Server-Sent Events using the AG-UI protocol. Each data: frame is one JSON event with a type (and snake_case fields). Core types include RUN_STARTED, TEXT_MESSAGE_START / TEXT_MESSAGE_CONTENT / TEXT_MESSAGE_END, TOOL_CALL_START / TOOL_CALL_ARGS / TOOL_CALL_END / TOOL_CALL_RESULT, RUN_FINISHED, and RUN_ERROR. Agent-specific signals (reasoning, artifacts, usage, and USER_INPUT_REQUIRED for human-in-the-loop) arrive as CUSTOM events. See the full AG-UI event-type reference →.


Pass a task_id to maintain context across multiple requests (an agent token can continue only conversations it started):

{
"messages": [{"role": "user", "content": "Now focus on only the critical ones"}],
"task_id": "task_xyz789"
}