Skip to content
中文

Errors & Rate Limits

Error Codes

HTTPMeaningFix
400Bad requestCheck body, model ID
401Auth failedCheck key
402Insufficient balanceTop up in the Console; service resumes at once
403Forbidden or account suspendedCheck the key and the account status
404Not foundCheck URL suffix, model ID
429Rate limitedWait per X-RateLimit-Reset-Requests
500Server errorRetry with backoff

Common 400s

STREAMING_UNPROVEN: drop stream: true or switch model. Model not found: copy exact ID from catalog. Missing max_tokens (Anthropic): add "max_tokens": 256.

Retry

Retryable: 429 (wait), 500 (backoff 1s→2s→4s), network drops. Non-retryable: 400, 401, 404.

Rate limits

HeaderMeaning
X-RateLimit-Limit-RequestsMaximum requests per minute
X-RateLimit-Remaining-RequestsRequests left in this window
X-RateLimit-Reset-RequestsTime until reset, formatted like 850ms or 1s
RateLimit-Limit, RateLimit-RemainingThe same limit in the IETF standard headers
RateLimit-ResetSeconds until reset, as an integer

Next steps

  • Guides: Pick a call style by task: streaming, tools, structured output.
  • Model catalog: Limits vary by model; check a model’s context and output caps.
  • Quotas and rate limits: Account-level quotas and limits.