指南
错误
所有错误的响应体都相同。仅对 429、500 和 503 重试。
错误响应体
json
{ "error": { "code", "message", "request_id", "param"?, "retry_after_s"? } }
错误码
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 | 重试 |
quota_exceeded | 429 | |
server_error | 500 | 重试 |
unavailable | 503 | 重试 |
accounts_closed | 503 |
llms-full.txt 解释了每个错误码。
如何重试
收到 429 时,等待 Retry-After 秒后再试;响应体中的 retry_after_s 与之一致。