OpenAI API error 429 rate limit exceeded
You're calling the OpenAI API and getting slammed with error 429 — your requests are being rejected faster than you can send them. This hits developers during load testing, production traffic spikes, or when you're accid
OpenAI API error 429 rate limit exceeded
You're calling the OpenAI API and getting slammed with error 429 — your requests are being rejected faster than you can send them. This hits developers during load testing, production traffic spikes, or when you're accidentally hammering the endpoint in a loop.
What's actually happening
Error 429 means you've exceeded your rate limits. OpenAI sets limits on three things: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). The exact numbers depend on your usage tier and which model you're calling.
When you see this error, the response typically looks like:
```
{
"error": {
"message": "Rate limit reached for requests",
"type": "requests",
"param": null,
"code": "rate_limit_exceeded"
}
}
```
Free tier accounts start with extremely low limits — sometimes just 3 RPM for GPT-4 models. Even paid accounts on usage tier 1 might only get 500 TPM for newer models. If you're on a new account or haven't spent much with OpenAI yet, you're probably hitting these walls constantly.
The limits reset every minute for RPM/TPM, but daily limits only reset after 24 hours. You can check your current tier at platform.openai.com/settings/organization/limits.
How to fix it
1. Check your actual limits
Go to platform.openai.com/settings/organization/limits and look at your usage tier. You'll see exact RPM and TPM numbers for each model. Compare these to what you're actually requesting. If you're sending 10 requests per minute but your limit is 3, that's your problem.
2. Implement exponential backoff
When you get a 429 error, wait before retrying. Start with 1 second, then 2, then 4, then 8. Most API libraries have retry logic built in — the official OpenAI Python library automatically retries with backoff if you set `max_retries=3` in your client config.
3. Add request queuing
Instead of firing all requests at once, queue them and release them at a controlled rate. If your limit is 60 RPM, send maximum one request per second. Simple rate limiters in Python (using `time.sleep()`) or Node.js (using `setTimeout`) work fine for this.
4. Batch your requests properly
If you're processing 100 documents, don't send 100 separate API calls in a loop. Either use the batch API endpoint (which processes requests asynchronously and doesn't count against rate limits the same way), or chunk your data and process it in smaller groups with delays between chunks.
5. Increase your usage tier
Spend more money with OpenAI and your tier automatically increases. Tier 2 requires $50 in successful payments and 7 days since first payment. Tier 3 needs $100 and 7 days. Tier 4 requires $250 and 14 days. Each tier multiplies your rate limits significantly — tier 4 gets 10,000 TPM on GPT-4o versus 500 TPM on tier 1.
If you need immediate increases and can't wait for automatic tier upgrades, check how to contact OpenAI support about tier exceptions — though they rarely make exceptions.
If that doesn't work
If you've implemented backoff, queuing, and you're still hitting limits constantly, you've outgrown your current tier. You have two options: spend enough to reach the next tier (which takes days to weeks), or redesign your application to make fewer, more efficient calls.
Look at whether you're sending redundant requests, using streaming when you don't need it, or requesting excessive max_tokens. Cut your token usage by 50% and you might double your effective throughput.
For other API errors like 401 authentication failures or 500 server errors, the fixes are completely different — make sure you're actually seeing "rate_limit_exceeded" in the error response.
Questions people actually ask
Q: Can I pay to increase my rate limits immediately?
A: No. Usage tiers are based on historical spending and account age, not prepayment. You can't buy your way to tier 5 on day one.
Q: Why do I get 429 errors when I haven't used my quota?
A: Rate limits are per-minute and per-day windows. Even if you haven't hit your daily quota, you might be sending too many requests in a single minute. Check both limits.
Q: Do different models have different rate limits?
A: Yes. GPT-4o, GPT-4, and GPT-3.5 all have separate TPM/RPM limits. Your tier 2 account might get 2M TPM on GPT-3.5-turbo but only 1M TPM on GPT-4o.
Q: Does the batch API avoid rate limits?
A: The batch API has separate, much higher limits and processes requests asynchronously over 24 hours. It's designed for bulk processing without hitting rate limits.
What to remember
- Check your exact tier and limits at platform.openai.com/settings/organization/limits — don't guess
- Implement exponential backoff retry logic in every API call
- Queue requests if you're processing batches — never fire them all simultaneously
- Usage tiers increase automatically based on spending and account age, not on request
- Batch API has separate limits if you're doing bulk processing
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*