OpenAI API 429 rate limit error how to fix
You're calling the OpenAI API and getting hit with error 429: "Rate limit reached." Your requests are being blocked, your application's stalled, and you need it working now.
OpenAI API 429 rate limit error how to fix
You're calling the OpenAI API and getting hit with error 429: "Rate limit reached." Your requests are being blocked, your application's stalled, and you need it working now.
What's actually happening
Error 429 means you've exceeded the rate limits OpenAI sets on API requests. These limits control how many requests you can make per minute (RPM) and how many tokens you can process per minute (TPM). When you cross either threshold, OpenAI's servers reject your requests until the limit window resets.
The exact limits depend on your usage tier. New accounts on the free tier get extremely low limits — often 3 RPM and 40,000 TPM for GPT-4. If you've spent $5, you jump to tier 1 with higher limits. Spend $50 and you reach tier 2. The system's designed to prevent abuse while gradually opening up capacity as you prove you're a legitimate user.
You'll see this error most often when testing loops that fire multiple requests quickly, when processing batch operations, or when your application suddenly scales up. The error response includes headers like `x-ratelimit-remaining-requests` and `x-ratelimit-reset-requests` that tell you exactly when you can try again — usually measured in seconds or milliseconds.
How to fix it
1. Check your current rate limits
Log into platform.openai.com, click Settings in the left sidebar, then Limits. You'll see your exact RPM and TPM caps for each model. Compare these numbers against how many requests your code's actually sending. If you're at tier 0 (free) and need higher limits, you'll need to add credit.
2. Add payment credit to increase your tier
Go to Settings > Billing > Add payment details. Add a payment method and purchase at least $5 in credits. Your tier升levels automatically based on how much you've spent — there's no manual upgrade button. After adding funds, refresh the Limits page to confirm your new tier. Tier 1 typically gives you 500 RPM for GPT-4, tier 2 gives you 5,000 RPM.
3. Implement exponential backoff in your code
Don't just retry immediately when you hit 429. Use exponential backoff: wait 1 second, then 2, then 4, then 8. Most API libraries have built-in retry logic. In Python with the OpenAI SDK, wrap calls in a try-except block that catches `RateLimitError` and sleeps before retrying. Check the `Retry-After` header in the 429 response — it tells you exactly how long to wait.
4. Batch requests and add delays
If you're processing multiple items, don't fire all requests simultaneously. Add a delay between calls — even 100ms helps. For larger jobs, use OpenAI's Batch API instead of real-time requests. You submit a JSONL file of prompts, OpenAI processes them within 24 hours at 50% cost, and rate limits don't apply.
5. Request a rate limit increase
If you've reached tier 4 or 5 and still need more capacity, go to Settings > Limits and click "Request increase" next to the model you need. Fill out the form explaining your use case, expected volume, and how you're handling rate limits. OpenAI reviews these manually — expect 3-7 days for a response. Enterprise customers get dedicated rate limits through their contracts.
If that doesn't work
Check if you're hitting a different limit. The 429 error also appears when you exceed organisation-level quota (total monthly spend cap). Go to Settings > Limits > Usage limits to see if you've set a hard cap on spending. If that's maxed out, increase it or remove the cap entirely.
If you've added credit but your tier hasn't updated, wait 5-10 minutes — the system doesn't always refresh instantly. Clear your browser cache and check Limits again. If your tier's still wrong after an hour, you'll need to contact OpenAI support with your organization ID and transaction details. Response times vary, but billing issues typically get answered within 48 hours. For the full contact process, see how to contact OpenAI support.
For persistent 429 errors that don't match your visible limits, check the error message carefully. Sometimes what looks like a rate limit is actually error code 429 insufficient_quota — a different issue entirely about account credit running out.
Questions people actually ask
Q: How long do I have to wait after hitting 429?
A: Usually 60 seconds for the rate limit window to reset. Check the `x-ratelimit-reset-requests` header in the error response for the exact timestamp.
Q: Does upgrading to ChatGPT Plus increase API limits?
A: No. ChatGPT Plus ($20/month) only affects the chatgpt.com interface. API limits are completely separate and based on your API usage tier at platform.openai.com.
Q: Can I pay extra to skip rate limits entirely?
A: Not directly. You can reach higher tiers by spending more through normal API usage, or apply for enterprise pricing which includes custom rate limits negotiated with OpenAI.
What to remember
- Rate limits are per model and reset every 60 seconds — wait before retrying
- Your tier increases automatically as you spend $5, $50, $500, $5,000 on API usage
- ChatGPT Plus subscription doesn't affect API rate limits at all
- Use the Batch API for large jobs — 50% cheaper and no rate limits
- Check Settings > Limits for your exact RPM and TPM numbers before debugging
---
*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*