OpenAI API 429 rate limit error how to fix
You're getting "Error 429: Rate limit reached" when calling the OpenAI API, and your application just stopped working. This hits developers hardest during load testing or when traffic suddenly spikes — your requests get
OpenAI API 429 rate limit error how to fix
You're getting "Error 429: Rate limit reached" when calling the OpenAI API, and your application just stopped working. This hits developers hardest during load testing or when traffic suddenly spikes — your requests get blocked, and OpenAI tells you to slow down.
What's actually happening
The 429 error means you've exceeded your rate limits — the number of requests you can make per minute (RPM) or the number of tokens you can process per minute (TPM). OpenAI sets different limits based on your usage tier, which increases automatically as you spend more money with them.
Here's what tier 1 (new accounts) typically gets: 500 RPM and 200,000 TPM for GPT-4o. If you're on tier 2, those limits jump to 5,000 RPM and 2,000,000 TPM. The error response includes specific headers telling you exactly which limit you hit: `x-ratelimit-limit-requests`, `x-ratelimit-remaining-requests`, and `x-ratelimit-reset-requests`.
The full error looks like this: `"error": {"message": "Rate limit reached for gpt-4o in organization org-xxx on requests per min (RPM): Limit 500, Used 500, Requested 1. Please try again in 60ms.", "type": "requests", "param": null, "code": "rate_limit_exceeded"}`. That "Please try again in 60ms" part tells you exactly how long to wait.
How to fix it
1. Check your current tier and limits
Go to platform.openai.com/settings/organization/limits. You'll see your exact RPM and TPM limits for each model. If you're still on tier 1, you need to spend at least $5 to reach tier 2, which gives you 10x more capacity.
2. Implement exponential backoff
Add retry logic to your code. When you get a 429, wait the time specified in the error message (or the `retry-after` header), then try again. Double the wait time with each retry — wait 1 second, then 2, then 4. Most API libraries have built-in retry mechanisms. In Python with the openai library, wrap calls in a try-except block that catches `RateLimitError`.
3. Batch your requests differently
If you're processing 1,000 documents, don't fire off 1,000 simultaneous requests. Queue them and process 10 at a time. Use a library like `asyncio` with semaphores in Python, or rate-limiting middleware in Node.js. This keeps you under your RPM cap while still processing everything.
4. Switch to batch API for non-urgent tasks
For work that doesn't need immediate results, use the Batch API instead. You submit a JSONL file of requests, OpenAI processes them within 24 hours, and you pay 50% less. This doesn't count against your rate limits at all. Upload your batch file at platform.openai.com/batches.
5. Request a rate limit increase
Click "Request increase" on the limits page. OpenAI reviews these manually, usually within 2-3 business days. Include your use case, expected traffic patterns, and why your current tier isn't enough. They're more likely to approve if you're on tier 2+ and have a payment history. For broader API issues beyond rate limits, check how to fix OpenAI API error 429 and other errors.
If that doesn't work
Email OpenAI support through platform.openai.com/settings/organization/general (scroll down to "Contact support"). Include your organization ID (starts with "org-"), the exact error message with timestamp, and which endpoint you're hitting. Response times average 24-48 hours for paid accounts, longer for free tier.
If you're hitting quota errors instead of rate limits (insufficient_quota), that's a billing issue — you've run out of credits or hit your monthly budget cap. See unexpected OpenAI charges and refund guide if charges aren't what you expected, or learn how to contact OpenAI support for account-specific problems.
Questions people actually ask
Q: Can I pay to increase my rate limits immediately?
A: No. Limits increase automatically as you spend more, but you can't pay directly for higher limits. Spend $50 total to reach tier 3, $1,000 for tier 4.
Q: Do rate limits reset every minute on the dot?
A: No, they use a sliding window. If you make 500 requests in 10 seconds, you'll hit your limit and need to wait until 60 seconds have passed since your first request in that burst.
Q: Are rate limits the same for all GPT-4 models?
A: No. GPT-4o has different limits than GPT-4 Turbo or the standard GPT-4. Check the limits page for each model you're using.
What to remember
- Rate limits are per organization, per model, per minute — not per API key
- The error message tells you exactly how long to wait before retrying
- Your usage tier increases automatically based on total spend, not request volume
- Batch API bypasses rate limits entirely for non-urgent work
- Implement exponential backoff in your code before requesting limit increases
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*