Skip to content

Deploy via REST API

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

See Authentication → for details.


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:

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