All errors return a consistent JSON envelope matching the OpenAI error
schema. Every response — success or failure — includes an
X-Request-Id header. Quote it in any support email and we can pull
the full trace.
Authenticated, but not allowed (suspended org, model not enabled, IP blocked, etc.).
No — fix the policy or pick another model.
404
not_found
Resource doesn't exist or isn't visible to you.
No.
409
conflict
Idempotency or uniqueness collision (e.g. coupon already used).
No — resolve the conflict.
413
invalid_request_error
Request body over the size cap: 32 MiB on /v1/chat/completions and /v1/embeddings, 10 MiB on every other route. The message states the limit; base64 attachments count at their encoded size. See 413 — request too large.
No — send fewer or shorter messages and tool outputs, or shrink attachments.
422
invalid_request_error
JSON parsed but fields are invalid.
No — fix the request.
429
rate_limit_error
Per-key RPM ceiling hit (Retry-After 1–60 s; message quotes your plan's limit), or an edge burst above 100 req/s / 400 concurrent on one key (Retry-After: 1; message Too many requests at the edge; retry after 1 second.). Same JSON shape — honour the Retry-After header either way.
Yes, after the window.
499
(informational)
Client closed the connection mid-stream. Billed for tokens produced up to the disconnect.
n/a
500
internal_error
Unhandled server-side fault.
Yes, with backoff.
503
service_unavailable
The model is temporarily unavailable — or, with code large_request_backpressure, a burst of very large requests briefly exceeded the platform's in-flight body budget (Retry-After: 2).
Yes, after Retry-After (30–60 s for a model outage).
The raw JSON body of one request may be at most 32 MiB (33,554,432
bytes) on POST /v1/chat/completions and POST /v1/embeddings, and
10 MiB (10,485,760 bytes) on every other route. Base64 attachments count
at their encoded size (4/3 of the file). Within a body, one message holds
at most 2,000,000 characters of text and 5 MB (decoded) of media, across at
most 20 media parts per request — those limits answer with 422.
Code
Meaning
Fix
request_too_large
The body is over the route's cap. The message quotes the declared size (when the client sent Content-Length) and the limit.
Not retryable. Drop earlier turns or tool outputs, or shrink attachments. Agentic clients should compact the conversation.
{ "error": { "type": "invalid_request_error", "message": "Request body too large: 34,000,000 bytes declared; the limit for POST /v1/chat/completions is 33,554,432 bytes (32 MiB). Send fewer or shorter messages and tool outputs, or shrink base64 attachments.", "code": "request_too_large", "request_id": "req_86By4H0S9VTH8PneVWokg" }}