OpenAI API error
OpenAI API 429 Rate limit reached for requests: what it means and how to fix it
429 Rate limit reached for requestsRetry? YesLast verified 5 documented fixes3 sources
What it means
You have hit your assigned rate limit: too many tokens or requests were submitted in a short period. Limits are measured in RPM, RPD, TPM, TPD, IPM and apply at organization and project level, not per user. The Python library raises RateLimitError.
Causes
- A loop or script that makes frequent or concurrent requests
- Sharing your API key with other users or applications
- Using a free plan that has a low rate limit
- Reaching the defined limit on your project
How to fix it
- Fix 1.
Pace your requests and avoid unnecessary or redundant calls.
- Fix 2.
If a Retry-After header is present, wait at least that long before retrying; if missing, use exponential backoff with jitter and limit the number of retries. Official SDKs automatically retry eligible 429 responses.
- Fix 3.
Set max_tokens as close to your expected response size as possible, since the rate limit counts the maximum of max_tokens and the estimated request tokens.
- Fix 4.
Use the Batch API for work that does not need immediate responses, upgrade usage tier, or ask your organization owner to raise project rate limits.
- Fix 5.
Configure SDK retries (default is 2).
Snippetclient = OpenAI( # default is 2 max_retries=0, )
More OpenAI API errors
All 23 OpenAI API errors400 invalid_request_error (Invalid service_tier argument)Retry? Not stated401 Invalid AuthenticationRetry? Not stated401 Incorrect API key providedRetry? Not stated401 You must be a member of an organization to use the APIRetry? Not stated401 IP not authorizedRetry? Not stated403 Country, region, or territory not supportedRetry? Not stated429 credit_balance_exhaustedRetry? No429 rate_limit_error slow_downRetry? Yes
HTTP 429 at other providers
Compare 429 across providers429 ThrottlingExceptionRetry? YesAmazon Bedrock429 ModelNotReadyExceptionRetry? YesAmazon Bedrock429 rate_limit_errorRetry? YesAnthropic API429 rate_limit_error (enforced_spend_limit_reached)Retry? NoAnthropic API429 Too Many Requests (Rate limit is exceeded)Retry? YesAzure OpenAI429 Too Many Requests (System is experiencing high demand)Retry? YesAzure OpenAI429 Too Many Requests (temporary rate limit adjustment)Retry? YesAzure OpenAI429 Too Many Requests (token budget exceeded by request parameters)Retry? Not statedAzure OpenAI429 Too Many RequestsRetry? YesCohere API429 - Rate Limit ReachedRetry? Not statedDeepSeek API429 rate_limit_exceededRetry? YesGemini API429 quota_exceededRetry? YesGemini API
FAQ
What does the OpenAI API error "429 Rate limit reached for requests" mean?
You have hit your assigned rate limit: too many tokens or requests were submitted in a short period. Limits are measured in RPM, RPD, TPM, TPD, IPM and apply at organization and project level, not per user. The Python library raises RateLimitError.
How do I fix OpenAI API "429 Rate limit reached for requests"?
There are 5 documented fixes. Start with the first: Pace your requests and avoid unnecessary or redundant calls.
Should I retry OpenAI API "429 Rate limit reached for requests"?
Yes. The official docs treat this error as retryable.
Which other AI APIs return HTTP 429?
Per their official error docs: Amazon Bedrock (429 ThrottlingException; 429 ModelNotReadyException), Anthropic API (429 rate_limit_error; 429 rate_limit_error (enforced_spend_limit_reached)), Azure OpenAI (429 Too Many Requests (Rate limit is exceeded); 429 Too Many Requests (System is experiencing high demand); 429 Too Many Requests (temporary rate limit adjustment); 429 Too Many Requests (token budget exceeded by request parameters)), Cohere API (429 Too Many Requests), DeepSeek API (429 - Rate Limit Reached), Gemini API (429 rate_limit_exceeded; 429 quota_exceeded; 429 too_many_requests; 429 RESOURCE_EXHAUSTED), Groq API (429 Too Many Requests), Mistral API (429 Too many requests), OpenRouter (429 rate_limit_exceeded), Vertex AI (429 RESOURCE_EXHAUSTED; 429 Resource exhausted, please try again later; 429 Too many requests. Exceeded the Provisioned Throughput), xAI API (429 Too Many Requests).
Sources
Last verified against 3 sources: OpenAI API's official docs and official SDK repositories.
- developers.openai.comhttps://developers.openai.com/api/docs/guides/error-codes
- developers.openai.comhttps://developers.openai.com/api/docs/guides/rate-limits
- github.comhttps://github.com/openai/openai-python/blob/main/README.md
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.