Skip to main content
OpenAI-compatible endpoints return the code field in the error envelope. Anthropic-compatible endpoints (/v1/messages) use a different envelope without code (see Errors). The 57 codes below apply to OpenAI-format responses.
Error CodeHTTP StatusDescription
batch_only400Model is batch-only and cannot serve real-time requests
budget_exhausted429Account or project budget reached
byok_keys_required400BYOK keys required but none are configured
client_disconnected0Client closed the connection before the response completed
content_filtered400The upstream provider’s content filter rejects the request
context_length_exceeded400Token count exceeds the model’s context window
cost_constraint_exceeded400No provider meets the cost constraint
duplicate_resource409A resource with this identifier already exists
expired_api_key401API key has expired
feature_disabled403Feature is not available for this account or plan
field_immutable400Field cannot be modified after resource creation
hosted_tool_not_supported400Model does not support the requested hosted tool on available providers
idempotency_conflict409Idempotency key reused with a different payload
insufficient_permissions403Caller authenticated but lacks the required scope
insufficient_quota429No quota remaining on the current plan
internal_error500Unexpected server error
invalid_api_key401API key is missing, malformed, revoked, or unrecognized
invalid_parameter_value400Field present, value outside allowed range or set
invalid_recovery_code401MFA recovery code is invalid or already used
invalid_request400Malformed or invalid request
json_mode_not_supported400Model does not support JSON mode
latency_constraint_exceeded400No provider meets the latency constraint
method_not_allowed405HTTP method not supported on this endpoint
mfa_required403Action requires multi-factor authentication step-up
mfa_verification_failed401TOTP verification code is incorrect or expired
missing_required_parameter400Required parameter not provided
model_not_found404Requested model ID isn’t in the catalog
model_unavailable503The requested model is temporarily unavailable
no_compatible_endpoint400No provider supports the required API endpoint for this model
no_provider_available503No provider can serve this request right now
no_responses_endpoint400Request requires the Response API but no provider supports it for this model
non_streaming_not_supported400Model requires streaming
operation_not_allowed400Operation not permitted for current resource state or role
payload_too_large413Request body exceeds the size limit
platform_keys_unavailable400No platform keys available for this model
provider_blocked400All providers for this model are in the blocklist
provider_not_in_allowlist400No provider in the allowlist supports this model
rate_limit_exceeded429Requests-per-minute cap hit
reasoning_not_supported400Model does not support reasoning/extended thinking
required_params_not_supported400No provider supports all required parameters
resource_not_found404Requested resource not found
response_api_only400Model is only available via the Response API
service_unavailable503Planned or temporary capacity shortage
state_precondition_failed409Resource is not in the required state for this operation
streaming_not_supported400Model does not support streaming
structured_output_not_supported400Model does not support structured output
thinking_disable_not_supported400Model does not support disabling thinking
throughput_constraint_not_met400No provider meets the throughput constraint
tier_opt_in_required400Model requires explicit tier opt-in (e.g., priority tier for fast mode)
tool_choice_required_not_supported400Model does not support tool_choice=“required”
tools_not_supported400Model does not support tool/function calling
tools_with_structured_output_not_supported400Model does not support tools with structured output
unknown_field400Request contains an unrecognized field
unsupported_modalities400Audio output is not supported
upstream_error502An upstream provider returned an invalid or unparseable response
upstream_timeout504Upstream exceeded the request deadline
vision_not_supported400Model does not support vision/image input