OpenAI API 429 rate limit how to fix

You're hitting a 429 error every time your app calls the OpenAI API, and your users are staring at error messages instead of getting responses. This happens when you're sending requests faster than your account's rate li

OpenAI API 429 rate limit how to fix

You're hitting a 429 error every time your app calls the OpenAI API, and your users are staring at error messages instead of getting responses. This happens when you're sending requests faster than your account's rate limits allow — and it's one of the most common API errors developers face.

What's actually happening

The 429 error means "Rate limit reached for requests." OpenAI sets strict limits on how many requests per minute (RPM) and tokens per minute (TPM) your API key can use. Free tier accounts get extremely low limits — sometimes as little as 3 RPM and 40,000 TPM. Even paid accounts start with conservative limits that scale up as you spend more.

When your code fires off requests too quickly, OpenAI's servers reject them with a 429 status code. The error response usually includes details about which limit you hit and how long to wait. You might see `rate_limit_exceeded` in the error type field, along with specifics like "Rate limit reached for gpt-4 in organization org-xxx on requests per min (RPM): Limit 500, Used 500, Requested 1."

This isn't a bug — it's intentional traffic control to keep the API stable for everyone. Your account tier, usage history, and the specific model you're calling all affect your limits.

How to fix it

1. Check your current limits

Log into platform.openai.com and go to Settings → Limits in the left sidebar. You'll see exact numbers for RPM and TPM for each model family. If you're on the free tier, you'll see minimal limits across the board.

2. Implement exponential backoff

Add retry logic to your code. When you get a 429 error, wait before trying again — and increase the wait time with each retry. Start with 1 second, then 2, then 4. Most OpenAI SDKs include this automatically, but if you're using raw HTTP requests, you need to code it yourself. Check the `Retry-After` header in the 429 response — it tells you exactly how many seconds to wait.

3. Add rate limiting to your code

Install a rate limiter library or write one. Before sending each request, check if you're within your RPM/TPM budget. For Python, `ratelimit` or `tenacity` work well. For JavaScript, try `bottleneck` or `p-limit`. Set your code's limits slightly below OpenAI's actual limits to leave a safety margin.

4. Upgrade your usage tier

Go to Settings → Limits and click "View tier details." You'll see your current tier and what you need to reach the next one. Tier 1 requires $5 in successful payments and 7 days since first payment. Tier 2 needs $50 and 7 days. Each tier dramatically increases your limits — Tier 2 gets you 5,000 RPM for GPT-4, versus 500 for Tier 1.

Make a small payment to trigger the upgrade. It can take 24-48 hours to process. For specific steps on resolving payment issues, see how to fix unexpected OpenAI charges.

5. Batch your requests

If you're processing multiple inputs, use the Batch API instead of firing individual requests. Go to platform.openai.com/batches and upload a JSONL file with your prompts. Batch requests are 50% cheaper and don't count against your real-time rate limits. Results come back within 24 hours.

If that doesn't work

Contact OpenAI support through platform.openai.com/account — click Help → Messages in the bottom right. Explain your use case, current tier, and why you need higher limits. Include your organization ID (from Settings → Organization) and specific models you're using. Response times average 2-3 business days for rate limit requests.

For enterprise needs, request a quota increase through the same support channel. OpenAI reviews usage patterns before approving increases, so show you've implemented proper rate limiting and error handling in your code. You'll find more details on contacting OpenAI support for account-specific issues.

Questions people actually ask

Q: Why am I getting 429 errors when I haven't used the API in days?

A: Rate limits are per-minute and per-day. Even if you haven't used the API recently, sending 10 requests in 5 seconds will trigger a 429 if your RPM limit is 3. It's about request velocity, not total volume.

Q: Do different models have different rate limits?

A: Yes. GPT-4 typically has lower RPM limits than GPT-3.5-turbo because it's more expensive to run. Check Settings → Limits to see the breakdown for each model family.

Q: Will upgrading to ChatGPT Plus increase my API limits?

A: No. ChatGPT Plus and API access are completely separate. API limits only increase through API spending and tier progression. A Plus subscription does nothing for your API account.

What to remember

  • Check Settings → Limits for your exact RPM and TPM numbers before debugging
  • Always implement exponential backoff with the `Retry-After` header
  • Tier upgrades require both spending and time — plan for 48-hour processing
  • Use the Batch API for non-urgent bulk processing to avoid rate limits entirely
  • Different models have different limits — switching to GPT-3.5-turbo might solve your immediate problem

---

*openai-support.com is an independent resource, not affiliated with OpenAI Inc.*

Related help