Guías
Errores
Todos los errores tienen el mismo cuerpo. Reintenta solo 429, 500 y 503.
Cuerpo del error
json
{ "error": { "code", "message", "request_id", "param"?, "retry_after_s"? } }
Códigos
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 | Reintentar |
quota_exceeded | 429 | |
server_error | 500 | Reintentar |
unavailable | 503 | Reintentar |
accounts_closed | 503 |
llms-full.txt explica cada código.
Reintentos
Con 429, espera Retry-After segundos antes de volver a intentarlo; retry_after_s en el cuerpo tiene el mismo valor.