Skip to main content

Error format

Developer API errors use stable machine-readable codes:
Some errors include additional structured fields, such as credit balances or retry timing. Do not depend on English error messages in production clients.

Common codes

Async /v1/runs reports oversized input as INVALID_INPUT. Realtime /v1/realtime/runs reports oversized input as INPUT_TOO_LARGE before the stream opens. Use GET /v1/models to discover supported model ids and account-specific availability before sending a model field.

Credit errors

Credit errors can include available and required values:

Rate-limit errors

Rate-limit responses include a Retry-After header when a retry delay is available.

Stream failures

For realtime runs, failures that happen before the stream opens return normal JSON errors. Failures after the stream opens are sent as terminal events: