Errors
Every error response uses the OpenAI-compatible envelope:
{
"error": {
"code": "insufficient_credits",
"message": "Insufficient credits to complete this request. Add credits or upgrade your plan.",
"type": "insufficient_quota",
"request_id": "..."
}
}The code field is the stable contract — match on it in your client. The message is human-readable and may evolve. Always include the request_id when contacting support.
Stable error codes
| code | HTTP | meaning |
|---|---|---|
invalid_api_key | 401 | The Authorization header was missing or the key didn't match a row. |
api_key_revoked | 401 | The key was revoked. Create a new one in /api-keys. |
api_key_paused | 401 | The key is paused. Resume it in /api-keys. |
insufficient_credits | 402 | Wallet balance minus locked credits would go negative. |
model_not_permitted | 403 | This key is restricted and the requested model is not on its allow-list. |
endpoint_not_permitted | 403 | This key cannot call this endpoint. |
org_suspended | 403 | The organisation owning this key is no longer active. |
model_not_found | 404 | No model with this slug, or it is currently disabled. |
rate_limit_exceeded | 429 | Per-key requests-per-minute or tokens-per-minute exceeded. |
concurrency_limit_exceeded | 429 | Too many in-flight requests on this key. |
invalid_request | 400 | Bad request body, missing required field, or schema violation. |
context_length_exceeded | 400 | Input + max_tokens exceeds the model's context window. |
provider_error | 502 | Upstream provider returned a non-recoverable error. |
provider_timeout | 504 | Upstream provider didn't respond in time. |
provider_unavailable | 503 | No provider is configured for this model right now. |
gateway_error | 500 | An error inside our gateway. Quote x-infra-request-id when reporting. |
internal_error | 500 | Catch-all for unexpected failures. Quote x-infra-request-id. |