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

codeHTTPmeaning
invalid_api_key401The Authorization header was missing or the key didn't match a row.
api_key_revoked401The key was revoked. Create a new one in /api-keys.
api_key_paused401The key is paused. Resume it in /api-keys.
insufficient_credits402Wallet balance minus locked credits would go negative.
model_not_permitted403This key is restricted and the requested model is not on its allow-list.
endpoint_not_permitted403This key cannot call this endpoint.
org_suspended403The organisation owning this key is no longer active.
model_not_found404No model with this slug, or it is currently disabled.
rate_limit_exceeded429Per-key requests-per-minute or tokens-per-minute exceeded.
concurrency_limit_exceeded429Too many in-flight requests on this key.
invalid_request400Bad request body, missing required field, or schema violation.
context_length_exceeded400Input + max_tokens exceeds the model's context window.
provider_error502Upstream provider returned a non-recoverable error.
provider_timeout504Upstream provider didn't respond in time.
provider_unavailable503No provider is configured for this model right now.
gateway_error500An error inside our gateway. Quote x-infra-request-id when reporting.
internal_error500Catch-all for unexpected failures. Quote x-infra-request-id.