OpenAI API 429 rate limit how to fix
You're hitting a 429 error from the OpenAI API, and your requests are being rejected. This happens when you've exceeded your rate limits — the maximum number of requests or tokens you can send per minute based on your us
OpenAI API 429 rate limit how to fix
You're hitting a 429 error from the OpenAI API, and your requests are being rejected. This happens when you've exceeded your rate limits — the maximum number of requests or tokens you can send per minute based on your usage tier.
What's actually happening
The 429 error comes with a specific message: `Rate limit reached for requests` or `Rate limit reached for tokens`. OpenAI enforces two separate limits: requests per minute (RPM) and tokens per minute (TPM). Your tier depends on how much you've spent — new accounts start at Tier 1 with just 500 RPM and 200,000 TPM for GPT-4 models, while accounts that have spent $1,000+ get bumped to higher tiers with millions of tokens per minute.
When you exceed either limit, the API returns a 429 status code and includes rate limit headers in the response. You'll see `x-ratelimit-remaining-requests: 0` or `x-ratelimit-remaining-tokens: 0`, along with `x-ratelimit-reset-requests` telling you when your quota resets. These limits reset every minute, not daily.
The catch: batch jobs and image generation have completely different rate limits. If you're mixing model types or running parallel requests across multiple scripts, you're combining against the same pool.
How to fix it
1. Check your current tier
Go to platform.openai.com/settings/organization/limits. You'll see your exact RPM and TPM limits for each model family. If you're on Tier 1 and making production-level requests, you're going to hit limits constantly.
2. Implement exponential backoff
When you get a 429, don't retry immediately. Wait 1 second, then 2, then 4, then 8. Most SDKs don't do this automatically. Here's what that looks like in Python:
```python
import time
for i in range(5):
try:
response = client.chat.completions.create(...)
break
except openai.RateLimitError:
wait_time = 2 ** i
time.sleep(wait_time)
```
3. Add request spacing
If you're sending 100 requests in a loop, you'll blow through your RPM in seconds. Add a `time.sleep(0.2)` between requests to spread them across the minute. For 500 RPM, that means roughly 8 requests per second maximum.
4. Monitor token usage
TPM limits hit harder than RPM for long prompts. If your average prompt is 5,000 tokens and you're on Tier 1 with 200,000 TPM, you can only make 40 requests per minute — not 500. Check `response.usage.total_tokens` in each response and track your running total.
5. Upgrade your tier
Add $50-100 to your account at platform.openai.com/settings/organization/billing. Once processed (usually within 24 hours), your tier automatically increases based on total spend. Tier 2 gets you 5,000 RPM and 2M TPM. Tier 3 requires $100 spent and gives you 10,000 RPM.
If none of these work, check for runaway loops in your code. One misconfigured while loop can send thousands of requests before you notice.
If that doesn't work
You might be hitting the free tier trial limit (different from usage tiers). New accounts get $5 free credit that expires after 3 months, with strict rate limits: 3 RPM for GPT-4. Once that credit runs out, you must add a payment method even if you have remaining credit.
Contact OpenAI support at help.openai.com with your organization ID (from platform.openai.com/settings/organization/general) and the exact error message. Include timestamps from your logs showing the 429 errors and your current tier from the limits page. For urgent production issues, you can request a temporary rate limit increase through their support form, but approval isn't guaranteed. Expect 2-3 business days for a response.
For persistent issues across multiple endpoints, you might be dealing with broader API authentication problems or account restrictions. Check platform.openai.com/account/billing/overview to confirm no unexpected charges have triggered a payment hold.
Questions people actually ask
Q: Will upgrading to ChatGPT Plus increase my API limits?
A: No. ChatGPT Plus ($20/month) and API usage are completely separate. API limits only increase by spending money specifically through the API or manually upgrading your usage tier through prepaid credits.
Q: How long does it take to move up a tier?
A: Usually 24 hours after your spending crosses the threshold. Tier 2 needs $50 total spend, Tier 3 needs $100, Tier 4 needs $250. Check platform.openai.com/settings/organization/limits to see your current tier.
Q: Can I pay to remove rate limits entirely?
A: No. Even Tier 5 accounts (requiring $1,000 spent) have limits — they're just much higher (10,000 RPM, 30M TPM for GPT-4). Enterprise customers can negotiate custom limits but that requires direct sales contact.
What to remember
- Rate limits are per minute, not daily — they reset every 60 seconds
- You have separate RPM and TPM limits — exceeding either triggers 429 errors
- Tier upgrades are automatic based on total API spend, not ChatGPT subscriptions
- Always implement exponential backoff in production code
- Check platform.openai.com/settings/organization/limits for your exact current limits
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*