OpenAI API 429 rate limit how to fix
You're hitting error 429 when calling the OpenAI API — your requests are being rejected before they even run. This happens when you exceed your organisation's rate limits, and it stops both production apps and test scrip
OpenAI API 429 rate limit how to fix
You're hitting error 429 when calling the OpenAI API — your requests are being rejected before they even run. This happens when you exceed your organisation's rate limits, and it stops both production apps and test scripts dead.
What's actually happening
Rate limit error 429 means you've sent too many requests in a short time window. OpenAI enforces limits on three things: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). When you cross any threshold, the API returns:
```
{
"error": {
"message": "Rate limit reached for gpt-4 in organization org-xxx on requests per min. Limit: 500 req/min.",
"type": "requests",
"code": "rate_limit_exceeded"
}
}
```
Your limits depend on your usage tier. New accounts start at Tier 1 with low caps — maybe 500 TPM for GPT-4. As you spend more and maintain your account longer, you automatically move up tiers with higher limits. You can't pay to skip ahead.
Different models have different limits. GPT-3.5-turbo typically allows more throughput than GPT-4. If you're running batch requests or hitting the API in a tight loop without delays, you'll slam into these walls fast. The error message tells you which limit you hit and your current cap.
How to fix it
1. Check your current limits
Go to platform.openai.com/settings/organization/limits. You'll see your tier, your limits for each model, and what you've used recently. If you're at Tier 1 or 2 with low caps, that's your bottleneck.
2. Add exponential backoff to your code
When you get a 429, wait before retrying. Start with 1 second, then double it each time (2s, 4s, 8s). Most API libraries have built-in retry logic — enable it. In Python with the official OpenAI library:
```python
from openai import OpenAI
client = OpenAI(max_retries=3)
```
The client will automatically back off on 429s.
3. Reduce your request frequency
If you're sending requests in a loop, add delays. Calculate your safe rate: if your limit is 500 RPM, send max 8 requests per second with a 0.125s sleep between calls. Batch multiple prompts into single requests when possible instead of firing one call per item.
4. Request a limit increase
Click "Request a limit increase" on the limits page. Fill out the form with your organisation ID, which model you need, and why. Be specific — "Running production chatbot serving 1,000 daily users, need 2,000 RPM for GPT-4" works better than "need more." OpenAI typically responds in 24-48 hours.
If you're denied, you'll need to wait until your spending increases your tier naturally. There's no appeal process for tier placement.
5. Switch models strategically
Use GPT-3.5-turbo for simple tasks that don't need GPT-4's reasoning. You'll have higher limits and lower costs. Reserve GPT-4 for complex requests where quality matters most.
If that doesn't work
You might be hitting other OpenAI API error codes like 401 (bad API key) or insufficient_quota (billing issue). Check the error type field in the response.
If your requests are legitimate production traffic and you've maxed your tier, contact OpenAI support at help.openai.com. Include your organisation ID (org-xxx), the specific model, your current and needed limits, and what you're building. Attach error logs showing the 429s with timestamps.
They don't typically override tier limits for new accounts, but they can clarify if you're close to upgrading or if there's a billing hold. Response time is usually 2-3 business days.
If you're seeing unexpected charges after increasing usage to climb tiers, review your spending in the usage dashboard before requesting higher limits.
Questions people actually ask
Q: How long do I have to wait after hitting a rate limit?
A: The limit resets every minute for RPM and TPM. Wait 60 seconds, then retry. The error often includes a retry-after header telling you exactly how long.
Q: Will upgrading to ChatGPT Plus increase my API limits?
A: No. ChatGPT Plus is separate from the API. Your API limits depend only on your API usage tier and spending through platform.openai.com.
Q: Can I pay to instantly increase my tier?
A: No. Tiers are automatic based on payment history and account age. You need at least 7 days at Tier 1, and $100+ paid to reach higher tiers. It's not instant.
Q: Why do I get 429 on my first request of the day?
A: You're probably hitting the requests-per-day limit, not per-minute. Check the error message. This is rare but happens on very low tiers.
What to remember
- Error 429 means you've exceeded requests per minute, tokens per minute, or requests per day
- Check platform.openai.com/settings/organization/limits to see your current tier and caps
- Implement exponential backoff in your code — wait 1s, 2s, 4s between retries
- Request limit increases through the platform with specific details about your use case
- Higher tiers require payment history and time — you can't skip ahead by paying more upfront
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*