Skip to content

Deploy via REST API

Authentication

All API calls require a Bearer token in the Authorization header. Get your API key from Account → API Keys → Create Key.

Terminal window
Authorization: Bearer afk_your_api_key_here
X-Agent-Id: your-agent-id

Run your agent

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

Streaming events

When stream: true, the response is Server-Sent Events:

data: {"type":"run_started","run_id":"run_abc","task_id":"task_xyz"}
data: {"type":"text_chunk","content":"Let me check the open P1 bugs..."}
data: {"type":"tool_call","tool":"github","action":"list_issues"}
data: {"type":"tool_result","tool":"github","result":{...}}
data: {"type":"text_chunk","content":"I found 3 open P1 issues:"}
data: {"type":"run_completed","run_id":"run_abc","credits_used":6}

Continuing a conversation

Pass a task_id to maintain context across multiple requests:

{
"query": "Now focus on only the critical ones",
"task_id": "task_xyz789"
}