Skip to main content
Errors raised by the gateway use the OpenAI error shape with an extra predev object. Provider errors, for example an invalid model id, are returned with their original status and message.

Codes

subscription_required

rate_limit_exceeded

The response also sets Retry-After. Catalog reads are not rate-limited.

Pass-through errors

Provider 4xx responses keep their status and body. An unknown model id, a malformed request, or a model that rejects a parameter all arrive with the provider’s original status and message. Check the model id against GET /v1/models first.

Handling in the SDKs

The OpenAI and Anthropic SDKs raise their usual typed exceptions by status: AuthenticationError (401), RateLimitError (429), NotFoundError (404), and APIStatusError with the original status for 402, 502, and 503. Read error.code from the body to distinguish insufficient_credits from subscription_required, and x-predev-request-id from the response headers when reporting a problem.
Streams that fail after headers are sent end early; the settled charge covers what the upstream generated. See streaming.