Errors

Error shapes, codes and idempotency.

Errors use the shape of the endpoint you called and always include request_id. Messages never reveal upstream vendors, hosts or model names.

HTTPOpenAI type / codeAnthropic error.typeMeaning
400invalid_request_error / invalid_request, unsupported_parameter, capability_not_supportedinvalid_request_errorMalformed body, or a field this model cannot honour (param names it).
401authentication_error / invalid_api_keyauthentication_errorMissing, invalid or revoked key.
402insufficient_balancebilling_errorAvailable credits are below the estimated cost. Top up or lower max_tokens.
402spend_limit_reachedbilling_errorA spend cap was reached: one you set on the API key (daily or monthly), on the coding session, or on the project (monthly) — see spend caps — or the limit on what a new account may spend in the 24 hours after its first payment. When the cap resets at a known time, retry-after says when.
403permission_errorpermission_errorMissing scope, suspended project, or a request from an address outside the key's IP allowlist (ip_not_allowed).
404invalid_request_error / model_not_foundnot_found_errorUnknown model for this key.
409invalid_request_error / idempotency_conflict—Same Idempotency-Key with a different body.
413request_too_largerequest_too_largeBody over 32 MB.
429rate_limit_error / rate_limitedrate_limit_errorRetry after the retry-after header.
502 / 503 / 504api_errorapi_error, overloaded_error (529), timeout_errorUpstream failed, is overloaded or timed out. Retryable; nothing is charged.

Idempotency

Non-streaming requests may carry an Idempotency-Key header. A retry with the same key and body within 24 hours returns the stored response with idempotency-replayed: true and is not charged again.