Azure OpenAI (Microsoft Foundry) error
Azure OpenAI 429 Too Many Requests (Rate limit is exceeded): what it means and how to fix it
429 Too Many Requests (Rate limit is exceeded)Retry? YesLast verified 3 documented fixes3 sources
What it means
Requests exceeded the TPM or RPM rate limit for the deployment's allocated quota. Messages include "Requests to ... have been limited" or "Rate limit is exceeded". TPM is based on an estimate that includes prompt text, max_tokens and best_of; RPM is evaluated over short windows of 1 or 10 seconds.
Causes
- TPM or RPM limit of the deployment reached
- Bursts of requests within a 1 to 10 second window even when the per-minute total is within limits
- Quota approved at subscription level but not allocated to the deployment receiving traffic
How to fix it
- Fix 1.
Follow the retry-after-ms header when present; otherwise retry with exponential backoff and random jitter and set a maximum number of retries.
- Fix 2.
Increase the deployment's TPM allocation, rebalance quota across deployments, or request a quota increase.
- Fix 3.
Use the SDK's built-in retry, which defaults to two retries.
Snippetclient = AzureOpenAI( azure_endpoint="https://<your-resource>.openai.azure.com/", api_key="<your-api-key>", api_version="2024-10-21", max_retries=5 # up to 5 retries with automatic exponential backoff )
More Azure OpenAI errors
All 15 Azure OpenAI errors400 Bad RequestRetry? Not stated400 content_filterRetry? Not stated200 finish_reason: content_filterRetry? Not stated200 content_filter_error (The contents are not filtered)Retry? Not stated401 UnauthorizedRetry? Not stated403 Forbidden (network access denied)Retry? Not stated403 Forbidden (resource has been temporarily blocked)Retry? Not stated404 Not FoundRetry? Not stated
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 RequestsRetry? YesCohere API429 - Rate Limit ReachedRetry? Not statedDeepSeek API429 rate_limit_exceededRetry? YesGemini API429 quota_exceededRetry? YesGemini API429 too_many_requestsRetry? YesGemini API429 RESOURCE_EXHAUSTEDRetry? YesGemini API429 Too Many RequestsRetry? YesGroq API429 Too many requestsRetry? YesMistral API
FAQ
What does the Azure OpenAI error "429 Too Many Requests (Rate limit is exceeded)" mean?
Requests exceeded the TPM or RPM rate limit for the deployment's allocated quota. Messages include "Requests to ... have been limited" or "Rate limit is exceeded". TPM is based on an estimate that includes prompt text, max_tokens and best_of; RPM is evaluated over short windows of 1 or 10 seconds.
How do I fix Azure OpenAI "429 Too Many Requests (Rate limit is exceeded)"?
There are 3 documented fixes. Start with the first: Follow the retry-after-ms header when present; otherwise retry with exponential backoff and random jitter and set a maximum number of retries.
Should I retry Azure OpenAI "429 Too Many Requests (Rate limit is exceeded)"?
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)), 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), OpenAI API (429 credit_balance_exhausted; 429 Rate limit reached for requests; 429 rate_limit_error slow_down; 429 organization_spend_limit_exceeded; 429 project_spend_limit_exceeded; 429 organization_usage_limit_exceeded), 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: Azure OpenAI's official docs and official SDK repositories.
- learn.microsoft.comhttps://learn.microsoft.com/en-us/azure/foundry/openai/how-to/quota
- learn.microsoft.comhttps://learn.microsoft.com/en-us/azure/foundry/openai/how-to/troubleshoot-errors
- learn.microsoft.comhttps://learn.microsoft.com/en-us/azure/foundry/openai/quotas-limits
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.