OpenAI API error 429 rate limit exceeded
You're hitting OpenAI's API and getting slammed with error 429. Your requests are failing, your application is broken, and you're staring at "Rate limit exceeded" messages.
OpenAI API error 429 rate limit exceeded
You're hitting OpenAI's API and getting slammed with error 429. Your requests are failing, your application is broken, and you're staring at "Rate limit exceeded" messages.
What's actually happening
Error 429 means you've sent too many requests to OpenAI's servers in a short time window. The API enforces strict limits on how many requests per minute (RPM) and tokens per minute (TPM) you can use, based on your usage tier and the specific model you're calling.
Here's the exact error you'll see:
```
{
"error": {
"message": "Rate limit reached for requests",
"type": "requests",
"param": null,
"code": "rate_limit_exceeded"
}
}
```
OpenAI assigns you a tier (1-5) based on how much you've spent with them historically. New accounts start at Tier 1 with tight limits — 500 RPM and 200,000 TPM for GPT-4o, for example. If you're hammering the API with loops, batch processing, or haven't implemented proper rate limiting in your code, you'll hit this wall fast. The limits also vary by model — GPT-4 has lower limits than GPT-3.5-turbo.
Sometimes you'll also see 429 errors related to token limits within individual requests, but the rate limit version specifically means you've exceeded your allowed throughput across multiple requests.
How to fix it
1. Check your current tier and limits
Go to platform.openai.com/settings/organization/limits. You'll see your exact tier and the RPM/TPM limits for each model. If you're Tier 1 and trying to process hundreds of requests, that's your problem right there.
2. Implement exponential backoff in your code
When you get a 429, don't immediately retry. Wait, then try again. Double the wait time with each failure. Here's the pattern:
- First retry: wait 1 second
- Second retry: wait 2 seconds
- Third retry: wait 4 seconds
- Keep doubling up to 60 seconds maximum
Most API libraries have this built in — enable it. For Python's `openai` library, it's automatic in recent versions.
3. Batch your requests properly
If you're processing lots of data, use the Batch API instead of real-time requests. It's 50% cheaper and doesn't count against your RPM limits the same way. Go to platform.openai.com/batches to upload your JSONL file. This works for tasks that can wait hours for results.
4. Add request queuing
Don't fire off 100 API calls simultaneously. Queue them and release them at a controlled rate. If your limit is 500 RPM, send 8 requests per second maximum (480 per minute). Build in buffer room — aim for 80% of your limit.
5. Request a tier increase
If you've been using the API for a while and need higher limits, you can request to move up tiers. Go to platform.openai.com/settings/organization/limits and click "Request increase". You'll need to show spending history — OpenAI typically wants $5-100+ spent at each tier before approving increases. Tier 2 requires $50 spent, Tier 3 needs $100, and so on.
If that doesn't work
Check if you're getting a different 429 variant. Some users see other API errors like 401 authentication failures or 500 server errors that get confused with rate limits. Look at the exact error message — it'll tell you if it's rate_limit_exceeded or something else like insufficient_quota.
If your tier increase request gets denied or you need urgent help, contact OpenAI support through platform.openai.com/account/support. Include your organization ID, your current usage patterns, and what you're building. Response times run 24-48 hours typically.
Watch for unexpected usage spikes. If you suddenly start seeing 429s and you haven't changed your code, check your usage dashboard at platform.openai.com/usage. You might have a runaway loop or someone else with API key access burning through your quota. If you see unexpected charges, rotate your API keys immediately.
Questions people actually ask
Q: How long does error 429 last?
A: It resets every minute. If you hit your RPM limit at 2:30:45 PM, those requests that pushed you over will age out by 2:31:45 PM. TPM limits work the same way — rolling 60-second window.
Q: Will upgrading to paid tier 5 remove all rate limits?
A: No. Tier 5 gives you 10,000 RPM and 30M TPM for GPT-4o, but limits still exist. You just get way more headroom. No tier has unlimited access.
Q: Can I use multiple API keys to bypass limits?
A: No. Limits are per organization, not per API key. Creating multiple keys under one org doesn't help. You'd need entirely separate OpenAI organizations, which violates their terms if you're doing it just to dodge limits.
What to remember
- Error 429 means you're sending too many requests per minute or tokens per minute for your tier
- Check platform.openai.com/settings/organization/limits to see your exact current limits
- Implement exponential backoff and request queuing in your code before sending more traffic
- Use the Batch API for non-urgent bulk processing to avoid rate limits entirely
- Request tier increases through your limits page if you have spending history and legitimate need
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*