Errors

Errors use an OpenAI-shaped envelope with a stable error code.

Shape

Terminal
{
  "error": {
    "message": "Incorrect API key provided or the key has been revoked.",
    "type": "invalid_api_key",
    "code": "invalid_api_key"
  },
  "request_id": "req_..."
}

Every response also carries an x-request-id header -- include it when reporting an issue.

Codes

CodeStatusMeaning
missing_api_key401No Authorization header was sent.
invalid_api_key401The key doesn't exist, or has been revoked.
forbidden403The key is valid but lacks a required scope, or a model is blocked by org policy.
company_suspended403The organization's access to inference has been suspended.
credit_limit_reached429The organization's monthly hosted credit quota is exhausted.
rate_limit_exceeded429Too many requests for this key in the current window.
concurrency_limit_exceeded429Too many concurrent hosted generations for the current plan.
model_capacity_reached429The model or a specific deployment is at its configured user or concurrency capacity.
model_not_found404The model slug doesn't exist, or is a draft not yet released.
model_not_available503The model exists but isn't currently serving traffic (deploying or administratively disabled).
model_retired410The model has been retired and no longer accepts generation requests.
model_not_allowed_for_plan403The model requires a higher plan than the organization is on.
provider_not_configured424The BYOK model's provider has no connected key for this org.
provider_invalid_credentials424The connected provider key was rejected -- reconnect it.
provider_rate_limit429The upstream provider itself rate-limited this request.
provider_error502The upstream provider or hosted worker returned an error.
invalid_request_error400The request body failed validation.
internal_error500Something went wrong on our side.