Skip to main content
Errors use RFC 9457 problem details, with the content type application/problem+json:
Branch on code, never on title or detail. When retryable is true, wait for the Retry-After header if there is one, and back off if there isn’t. Some errors add fields, such as upgrade_url on 402 credits_exhausted or valid_fields on a bad fields path. Each error’s page lists them. Errors never cost API credits. MCP tools return the same errors as a tool result with isError: true, carrying code, suggestion and retryable. Handling errors has a retry helper in curl, TypeScript and Python.

All errors