OpenAI API 429 rate limit error how to fix
You're building something with the OpenAI API, and suddenly your requests start failing with error 429. Your application grinds to a halt, and you're stuck wondering whether you hit a hard limit or just need to wait.
OpenAI API 429 rate limit error how to fix
You're building something with the OpenAI API, and suddenly your requests start failing with error 429. Your application grinds to a halt, and you're stuck wondering whether you hit a hard limit or just need to wait.
What's actually happening
Error 429 means "too many requests" — OpenAI's API is telling you to slow down. You've exceeded your rate limit, which controls how many requests you can send per minute (RPM) or how many tokens you can process per minute (TPM). These limits exist to prevent server overload and ensure fair access for all users.
The exact limit depends on your account tier and the model you're using. Free trial accounts get very low limits — often just 3 RPM and 40,000 TPM for GPT-3.5-turbo. Paid accounts with higher usage tiers can send hundreds or thousands of requests per minute. When you hit your limit, the API rejects new requests until your rate limit window resets, usually after 60 seconds.
You'll typically see an error message like: `Rate limit reached for requests` or `You exceeded your current quota, please check your plan and billing details`. Sometimes it includes your current limits: `Rate limit: 3 / min. Current: 3 / min`.
How to fix it
1. Check your current rate limits
Go to platform.openai.com/settings/organization/limits. Log in, select your organization if you have multiple, and look at the "Rate limits" section. You'll see exact numbers for each model — requests per minute, tokens per minute, and requests per day.
If you're on a free trial, your limits are very low. If you recently signed up for a paid account, your limits start modest and increase automatically as you build payment history.
2. Implement exponential backoff
Add retry logic to your code. When you get a 429 error, wait a few seconds and 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
- Fourth retry: wait 8 seconds
- Give up after 5 attempts
Most API libraries have built-in retry logic. The official OpenAI Python library does this automatically if you set `max_retries=3` when initializing the client.
3. Spread out your requests
If you're sending batches of requests all at once, add delays between them. Instead of firing off 100 requests instantly, send one every 2-3 seconds. Calculate your safe rate: if your limit is 10 RPM, that's one request every 6 seconds.
For bulk processing, use the Batch API instead at platform.openai.com/batches. It processes large jobs asynchronously without hitting rate limits, costs 50% less, and returns results within 24 hours.
4. Request a rate limit increase
Go to platform.openai.com/settings/organization/limits and click "Request increase" next to the model you need. Fill out the form explaining your use case, current usage patterns, and why you need higher limits. OpenAI typically reviews these within 2-3 business days.
You'll need an active paid account with usage history. They rarely approve increases for brand-new accounts — you need to demonstrate responsible usage first by running your application for a few weeks at lower limits.
If that doesn't work
Contact OpenAI through platform.openai.com/account/support — click "Get help" in the bottom right corner. Include your organization ID (found at platform.openai.com/settings/organization/general), the specific error message, which model you're using, and your typical request pattern.
If you keep hitting 429 errors even with proper backoff logic and you're well below your stated limits, check for multiple API keys. If different parts of your application use separate keys from the same organization, they all share one rate limit pool. Consolidate to one key if possible.
For urgent issues affecting production applications with unexpected charges, you can describe your situation when you contact OpenAI support, but there's no emergency hotline. Most support responses arrive within 2-3 days. The full list of API errors including 401, 500, and quota issues can help diagnose other problems you might encounter.
Questions people actually ask
Q: Will my rate limit increase automatically if I pay more?
A: Not directly. Higher spending creates usage history, which makes OpenAI more likely to approve increase requests. But you still need to request increases manually.
Q: How long does a 429 error block last?
A: Rate limits reset every 60 seconds. If you hit your RPM limit at 2:30:45 PM, you can send new requests at 2:31:00 PM. The limit is a rolling window, not a hard cutoff.
Q: Can I use multiple API keys to get around rate limits?
A: No. All keys under one organization share the same rate limits. Creating multiple organizations violates OpenAI's terms of service and can get all your accounts banned.
What to remember
- Check your exact limits at platform.openai.com/settings/organization/limits before debugging
- Always implement exponential backoff — waiting and retrying solves 90% of 429 errors
- Use the Batch API for bulk processing jobs instead of rapid-fire requests
- Request increases only after you've used your paid account consistently for a few weeks
- Multiple API keys don't help — they all share one rate limit pool per organization
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*