Guides
Errors
Every error has the same body. Retry only 429, 500 and 503.
Error body
json
{ "error": { "code", "message", "request_id", "param"?, "retry_after_s"? } }
Codes
invalid_parameter | 400 | |
missing_location | 400 | |
invalid_json | 400 | |
invalid_key | 401 | |
unauthorized | 401 | |
key_required | 401 | |
place_not_found | 404 | |
not_found | 404 | |
invalid_promo | 404 | |
method_not_allowed | 405 | |
gone | 410 | |
key_exists | 409 | |
key_limit | 409 | |
already_subscribed | 409 | |
no_subscription | 409 | |
unsupported_media_type | 415 | |
rate_limited | 429 | Retry |
quota_exceeded | 429 | |
server_error | 500 | Retry |
unavailable | 503 | Retry |
accounts_closed | 503 |
llms-full.txt explains every code.
Retrying
On 429, wait Retry-After seconds before trying again; retry_after_s in the body matches it.