Skip to content

Authentication

API key authentication

Authorization: Bearer afk_your_api_key

Get your API key from Console → Settings → API Keys.


Required headers

Authorization: Bearer afk_your_api_key
X-Agent-Id: your-agent-id
Content-Type: application/json

Find your agent’s ID in Console → Agents → [your agent] → Settings.


Example request

Terminal window
curl -X POST https://api.auteryn.ai/api/run \
-H "Authorization: Bearer afk_live_abc123" \
-H "X-Agent-Id: agent_xyz789" \
-H "Content-Type: application/json" \
-d '{"query": "Summarize the open GitHub issues"}'

Security

  • API keys are org-scoped — they access all agents in your organization
  • Always use HTTPS — never send API keys over plain HTTP
  • Store keys in environment variables, not in code
  • Rotate keys if compromised: Settings → API Keys → Revoke

Error responses

StatusCodeMeaning
401unauthorizedMissing or invalid API key
403forbiddenKey valid but no access to this resource
429rate_limitedToo many requests — slow down