Errors
All error responses follow a consistent format:
{
"error": "ErrorCategory",
"message": "Human-readable explanation"
}Status Codes
401
Unauthorized
Missing, invalid, revoked, or expired API key
402
Payment Required
Insufficient credits for the operation
403
Forbidden
No active subscription, key lacks required scope, wrong agent, or master key required
404
Not Found
Agent or resource does not exist
409
Conflict
Agent is not in the required state (e.g., chatting with a stopped agent)
422
Validation Error
Request body failed validation
429
Too Many Requests
Rate limit exceeded
502
Bad Gateway
Agent container returned an error or is unreachable
503
Service Unavailable
Agent container is not running
Error Examples
401 — Invalid API Key
402 — Insufficient Credits
403 — Missing Scope
403 — Master Key Required
403 — No Active Master Key (Agent Key Creation)
403 — No Active Subscription
404 — Agent Not Found
422 — Validation Error
502 — Gateway Error
Troubleshooting
401 on every request
Key was revoked or regenerated
Create a new key from the dashboard
403 "active subscription required"
Subscription expired or canceled
Reactivate your subscription
403 "lacks the required scope"
Agent key missing the needed scope
Create a new agent key with the correct scopes
403 "master API key required"
Using an agent key on a master-only endpoint
Use your master key for CRUD and billing operations
402 on create/start
Low credit balance
Check balance with GET /billing/credits and top up
409 on chat/reload
Agent is not running
Start the agent first with POST /agents/{id}/start
502 on chat
Agent container crashed or is unresponsive
Check agent health with GET /agents/{id}/health
Last updated