Skip to main content

Error codes

type mapping: 401 → authentication_error, 403 → permission_error, 429 → rate_limit_error, ≥ 500 → api_error, else invalid_request_error.

CodeHTTPWhen
missing_api_key401No / empty bearer token
invalid_api_key401Unknown key hash
key_revoked401Revoked
key_expired401Expired
key_inactive401Non-active status
key_blocked403Blocked key
model_access_denied403Model not in the key allowlist
scope_blocked403User, team, org or app is blocked
customer_blocked403Customer is blocked
guardrail_blocked403Pre or post guardrail block
budget_exceeded429Key, scope, tag or customer budget exhausted
rate_limit_exceeded429RPM or TPM window exhausted
invalid_request400Bad JSON or missing model
model_not_found404No enabled deployments (and fallbacks exhausted)
upstream_unavailable502Every deployment attempt failed
internal_error500Key context / DB failure
unhealthy503Health / readiness probe failure

Rate-limit messages include the scope: RPM limit exceeded for key (limit N/min), TPM limit exceeded for team (limit N tokens/min). Scopes: key, team, application, customer (chat only).

Budget messages include the entity and spend vs max, for example Budget has been exceeded! Key=<alias> Current cost: X, Max budget: Y.