API
Errors
Status codes and the error envelope.
Partner envelope
Partner errors are JSON: {"ok": false, "error": "...", "code": "..."}.
| HTTP | code | When |
|---|---|---|
| 401 | authentication_error | Missing or unknown key. The message is “invalid API key”. |
| 403 | scope_denied | The key was not granted that capability. |
| 403 | agent_denied | The key cannot use that agent. |
| 402 | spend_cap | The key's monthly credit cap is used up. |
| 402 | insufficient_quota | The account cannot spend. The message is the wallet reason, or “You're out of credits.” |
| 429 | rate_limited | The key is over its requests-per-minute limit. Retry-After is 1. |
| 400 | agent_required | agent_id was missing on a call that needs one. |
| 400 | json | The body was not a JSON object. |
| 404 | not_found | That conversation, file, or number does not exist. |
| 404 | calls_off | The voice-call stack is not available. |
| 413 | too_large | The partner body or the uploaded file is over its limit. |
| 403 | unavailable | Video generation is switched off for the account. |
Chat completions
POST /api/v1/chat/completions uses an OpenAI-style error object. The HTTP status still matches the table above. The type is authentication_error, insufficient_quota, or permission_error. See Chat completions.