Errors
The error envelope
Every JSON error uses one shape. The HTTP status carries the class. The code carries the reason.
The envelope is the same on the seven capability endpoints and on the OpenAI-compatible endpoints.
One case falls outside the envelope. A wrong method or an unrouted path returns the plain text 404 Not Found, with content type text/plain. A GET on a capability path hits this case.
Codes
The spec declares 502 and 529 on the seven capability endpoints. It declares 529, but not 502, on POST /v1/chat/completions.
Validation messages
invalid_request reports the first three validation issues. Each issue reads path: message. The issues join with ; , and the path is body when the rule covers the whole object.
The message body: provide text or texts, not both also appears when you send neither field. Check that your body carries text or texts before you hunt for a duplicate. yes-no is the exception: it accepts both keys, and it accepts neither.
OpenAI-compatible errors
The facade rejects requests it cannot map to a capability.
A wrong id on GET /v1/models/{id} returns a shorter message.
Which errors you retry
The spec declares no Retry-After header on any response. Pick your own delays.
Use exponential backoff with jitter on 502 and 529. Cap the attempts at three. Treat 529 as backpressure, not as a fault. Lower your concurrency when you see it often.
Retry code
The examples below retry 502 and 529 only, and give up after three attempts.
No API key is required during the launch period. The API documents no 401 and no 403. If you see one, check the network path in front of the API.
Next
- Limits and rate limits lists every field limit that raises
invalid_request. - Input shows how to shape
textandtextscorrectly. - Extract documents the schema rules behind
invalid_schema.