Authentication
API key authentication
Authorization: Bearer afk_your_api_keyGet your API key from Console → Settings → API Keys.
Required headers
Authorization: Bearer afk_your_api_keyX-Agent-Id: your-agent-idContent-Type: application/jsonFind your agent’s ID in Console → Agents → [your agent] → Settings.
Example request
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
| Status | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key |
403 | forbidden | Key valid but no access to this resource |
429 | rate_limited | Too many requests — slow down |