OpenAI API 429 rate limit how to fix
Your API calls are returning error 429, and your application just stopped working. This hits developers hardest during production deployments or when testing new features — OpenAI's rate limits kick in faster than you ex
OpenAI API 429 rate limit how to fix
Your API calls are returning error 429, and your application just stopped working. This hits developers hardest during production deployments or when testing new features — OpenAI's rate limits kick in faster than you expect.
What's actually happening
Error 429 means you've exceeded OpenAI's rate limits for your account tier. The full error looks like this:
```
{
"error": {
"message": "Rate limit reached for requests",
"type": "requests",
"code": "rate_limit_exceeded"
}
}
```
OpenAI enforces three separate limits: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). Free tier accounts get severely restricted limits — 3 RPM and 40,000 TPM for GPT-4. Even paid accounts hit walls: tier 1 gets 500 RPM, tier 2 gets 5,000 RPM. Your usage tier depends on how much you've spent with OpenAI historically, and you can't buy your way into a higher tier instantly.
The error response includes a `Retry-After` header telling you exactly how many seconds to wait, but most developers miss this detail and just hammer the endpoint repeatedly.
How to fix it
1. Check your current limits
Go to platform.openai.com/settings/organization/limits. You'll see your exact RPM, TPM and RPD caps for each model. Compare these numbers against your actual usage in the last hour.
2. Implement exponential backoff
Add this retry logic to your code:
```python
import time
from openai import OpenAI
client = OpenAI()
max_retries = 5
for attempt in range(max_retries):
try:
response = client.chat.completions.create(...)
break
except openai.RateLimitError as e:
if attempt == max_retries - 1:
raise
wait_time = (2 ** attempt) + random.uniform(0, 1)
time.sleep(wait_time)
```
This waits 1 second, then 2, then 4, then 8 before giving up. Respect the `Retry-After` header if your library exposes it.
3. Reduce your token usage
Each request consumes tokens from your TPM limit. If you're sending 2,000-token prompts at 100 RPM, you'll burn through 200,000 TPM instantly. Shorten your system prompts, use GPT-3.5-turbo instead of GPT-4 for simple tasks, or implement response streaming to spread token usage over time.
4. Request a limit increase
Click "Request increase" on platform.openai.com/settings/organization/limits. You'll fill out a form explaining your use case. OpenAI typically responds within 2-3 business days, but they're more likely to approve increases if you've been using the API consistently for at least a week and have payment history.
If this fails, check whether you qualify for a higher usage tier by spending more — tier 2 requires $50 paid, tier 3 requires $100 paid, tier 4 requires $500 paid.
If that doesn't work
Email OpenAI at api-support@openai.com with these exact details:
- Your organization ID (from platform.openai.com/settings/organization/general)
- The specific model causing 429 errors
- Your current usage tier and limits
- Screenshots of your limits page
- Why you need higher limits (be specific about your application)
Realistic response time: 3-7 business days. They won't negotiate on tier requirements — if you haven't spent $50, you're stuck at tier 1 limits no matter how urgent your need.
For other API errors like 401 authentication failures or 500 server errors, see our guide on OpenAI API error 429 and other API errors. If you need to escalate faster, read how to contact OpenAI support for alternative channels.
Questions people actually ask
Q: Can I pay extra to skip the rate limits immediately?
A: No. Usage tiers are based on historical spending over time, not one-time payments. You must spend $50 total to reach tier 2, and that spending needs to happen gradually — dumping $50 on credits today won't instantly upgrade you.
Q: Why do I get 429 errors when I haven't used the API today?
A: You're likely hitting the requests-per-minute limit, not the daily limit. One burst of 10 requests in 5 seconds will trigger 429 on a free tier account (3 RPM cap).
Q: Do rate limits reset at midnight?
A: No. RPM and TPM limits are rolling windows — if you make 500 requests at 2:00 PM, you can't make another 500 until 3:00 PM. Daily limits reset at midnight UTC.
What to remember
- Error 429 means you've exceeded RPM, TPM or RPD limits for your usage tier
- Implement exponential backoff with the `Retry-After` header before retrying
- Check platform.openai.com/settings/organization/limits for your exact caps
- Higher tiers require historical spending — $50 for tier 2, $100 for tier 3
- Limit increase requests take 2-3 business days and aren't guaranteed
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*