API referenceError code index

Error code index

Each error code the API returns has its own page with the situation that causes it, an example body and the fix. The complete envelope and the retry rules are on Error codes.

StatusCodes
400invalid_json, messages_required, invalid_request, context_length_exceeded, model_unavailable, invalid_surface, invalid_capability, beta_required, unknown_beta, invalid_version, unsupported_parameter, invalid_parameter
401unauthenticated, invalid_api_key, revoked_api_key, expired_api_key, invalid_token, token_revoked
402quota_exhausted
403public_key_rejected, origin_not_allowed, insufficient_scope, account_disabled, org_unavailable, org_membership_required, plan_required, model_not_in_plan, zero_retention_unavailable, feature_unavailable, forbidden, admin_key_required, inference_not_allowed, ip_not_allowed, region_mismatch, policy_denied
404model_not_found, not_found
405method_not_allowed, endpoint_not_supported
408request_timeout
409conflict, idempotency_key_reused, resource_conflict
413payload_too_large, too_many_messages
422output_schema_violation
429rate_limited, model_busy, capacity_busy
500internal_error, server_misconfigured
502upstream_error, upstream_unavailable, stream_error
503authorization_unavailable, usage_check_unavailable, plan_check_unavailable, models_unavailable, model_retention_unverifiable, service_unavailable
504upstream_timeout

Live codes are exactly the public catalog in the platform’s error envelope (error-envelope.ts); every type is fixed by the HTTP status. Pages marked Preview are planned codes for endpoints still being built, or codes the platform returns today that are not yet in the public catalog. Codes used only by the private mobile conversation routes are not documented.

Was this page helpful?