Errors & limits

Error reference

Errors use the OpenAI envelope: an HTTP status plus an error.message string.

Status codes

StatusMeaningAction
400Malformed requestRead error.message; fix the payload
401Key not found or revokedCreate a new key
402Insufficient creditTop up
429Rate limitedExponential backoff, then retry
502Upstream unavailable / bad model nameVerify model, retry

Retry policy

Retry 429 and 5xx up to three times with jittered exponential backoff. Do not retry 401 or 402.

Placeholder: published rate-limit tiers are not final.