REQUEST TROUBLESHOOTING

AI API error 429: rate limits, credits and spend caps

A 429 is a request limit response, not proof of a provider outage. Read the provider error code, message and retry headers before retrying.

Quick answer

A 429 is a request limit response, not proof of a provider outage. Read the provider error code, message and retry headers before retrying.

What each provider documents

OpenAI distinguishes request rate limits, exhausted credits and organization or project limits. Inspect error.code; retrying a billing or usage limit does not restore access.

Claude uses 429 rate_limit_error for request limits, acceleration limits and some spend caps. A usage-tier monthly spend-cap response has no retry-after header and continues until access resumes. A Claude Code workspace spend limit can also cause a 429. Check the response and the relevant limit before retrying.

For Gemini GenerateContent, 429 RESOURCE_EXHAUSTED can indicate request, token, daily or spend limits. The same status name can accompany HTTP 402 when Prepay credits are depleted. Interactions uses different error.code values, including rate_limit_exceeded and quota_exceeded. Read the HTTP status and endpoint-specific details; RESOURCE_EXHAUSTED alone is not an HTTP code or proof of an outage.

Official SDKs can retry before your code sees an error. Claude’s official SDKs retry connection errors, rate limits and 5xx server errors twice by default with exponential backoff and honor retry-after when present. Gemini’s Python SDK retries timeouts, network issues, 429 and 5xx responses up to four times, with an initial delay of about 1 second and a maximum delay of 60 seconds.

Recommended application response

Reduce request concurrency for a transient rate limit, honor a supplied retry delay, and set a maximum attempt count and total deadline. Account for retries already performed by your SDK. A missing retry header does not identify the cause on its own.

Preserve a sanitized error body and request ID. Check your account configuration privately when the error reports a credit or spend limit; do not publish credentials. Compare the relevant API status scope with your request evidence.

Related service pages

Each entry shows its own collection coverage. A linked service is not necessarily automatically collected.

Editorial review date applies to this guide. Live report collection times appear on the service pages.

Cookie preferences

With your permission, we use Google Analytics and Umami to understand service queries. These tools use cookies or browser storage. Optional analytics stay off until you accept.

Cookies and storage details