Skip to main content
HTTP errors use an OpenAI-shaped envelope: {"error": {"message", "type", "code"}}. The tables below cover HTTP inference behavior. For Responses WebSockets, upgrade failures use HTTP statuses, but failures after the upgrade arrive as JSON events.

Responses WebSocket errors

Handle all three error surfaces: a generic error event carries error and numeric status; response.failed carries response.error; and response.steer.failed carries error plus the rejected or unapplied steering input under steer. A generic event’s status classifies the error—it is not another HTTP response on the upgraded socket. An incomplete response is not necessarily a failure: reason steered is the expected handoff to a successor, while max_output_tokens means truncation. Do not automatically retry either. Accepted input and connection-local history are not durable; reconcile them before resubmitting after a disconnect. See the steering error table and recovery checklist.

Status codes

Envelope

429 Too Many Requests
Non-JSON failures (upstream proxy errors, etc.) may not carry this envelope — parse defensively and treat any non-200 without a valid envelope as retryable-after-backoff.

429 vs 503 — capacity semantics

When the service is busy, your request waits in a priority queue (see Service tiers) for up to 30 seconds. Capacity itself is confirmed before a request is dispatched: a request is either dispatched or rejected.
  • 429 fleet_capacity_exhausted is definitive: the queue wait expired or the service confirmed it was full before accepting anything. Nothing was processed, nothing billed — retrying after Retry-After: 1 (with exponential backoff and jitter) is always safe.
  • 503 model_unavailable: the model temporarily has no healthy servers. Back off on the order of minutes.
  • 504 upstream_response_deadline_exceeded: generation ran past the absolute deadline before any response headers were sent. Nothing was delivered; retry with backoff.

Rate limits

Limit the number of in-flight requests your client sends. If you receive 429 fleet_capacity_exhausted, honor Retry-After and retry with exponential backoff and jitter. Available capacity can vary; reduce concurrency if 429 responses persist.

Timeouts

  • Requests are bounded by a 1,800-second absolute upstream deadline. A request that produces nothing for 1,740 seconds fails with 504 upstream_response_deadline_exceeded (before response headers) or a mid-stream error (after they were sent).
  • Streams stay alive via keep-alives (see Streaming).
  • Set client read timeouts above these values; a client timeout mid-generation still bills tokens generated before the disconnect.