Core concepts
Errors
Error shape and the stable status codes the API returns.
Errors return a JSON body with a stable code, a human-readable message, and the requestId for tracing:
Status codes
Every 402 is fixed in the dashboard: add funds, or finish the wallet setup for that chain. Retry a 429 after its retry-after header, and a 500 or 503 shortly after; if a 500 persists, share its requestId.
The request body is capped at 4 MB. This is usually hit by base64-encoded attachments (images and PDFs), which inflate by about a third over their file size, so a ~3 MB image can push a request past the limit on its own. Downscale images, send a URL instead of inline base64 where the model supports it, or split a long conversation.
Rate-limit specifics live on the Rate limits page.