OpenAI API 429 rate limit error how to fix

You're hitting rate limits on the OpenAI API and getting error 429 responses. This happens when you exceed the requests-per-minute (RPM) or tokens-per-minute (TPM) limits tied to your usage tier, and it stops your applic

OpenAI API 429 rate limit error how to fix

You're hitting rate limits on the OpenAI API and getting error 429 responses. This happens when you exceed the requests-per-minute (RPM) or tokens-per-minute (TPM) limits tied to your usage tier, and it stops your application dead until the limit window resets.

What's actually happening

OpenAI enforces strict rate limits based on your API usage tier. Free-tier accounts get minimal limits — often just 3 RPM and 40,000 TPM for GPT-3.5, which you'll blow through in seconds with any real application. Paid accounts get higher limits that scale with how much you've spent historically, but you can still hit the ceiling during traffic spikes.

When you exceed your limit, the API returns a 429 status code with error messages like "Rate limit reached for requests" or "You exceeded your current quota, please check your plan and billing details." The first means you're sending too many requests too fast. The second often appears alongside 429 errors when you've also run out of credits, though that's technically a different issue covered in our guide on unexpected OpenAI charges and quota problems.

The limit resets every minute for RPM and every day for daily token limits, but your application doesn't know that — it just sees failed requests and broken functionality.

How to fix it

1. Check your current rate limits

Go to platform.openai.com/settings/organization/limits. Log in, click your organisation name top-right, then Settings → Limits. You'll see exact numbers for each model — GPT-4, GPT-3.5, embeddings, etc. Note your RPM and TPM limits.

2. Implement exponential backoff

Add retry logic to your code that waits progressively longer after each 429 error. Start with a 1-second wait, then 2, 4, 8 seconds. Most OpenAI SDKs have this built-in, but verify it's enabled. In Python with the official library, retries happen automatically for 429 errors — up to 2 attempts by default.

3. Add request queuing

If you're processing batch requests, don't fire them simultaneously. Queue them and send one every few seconds to stay under your RPM limit. For 3 RPM, that's one request every 20 seconds. Calculate: 60 seconds ÷ your RPM = minimum seconds between requests.

4. Reduce tokens per request

If you're hitting TPM limits, shorten your prompts or lower max_tokens in your API calls. A single request with max_tokens=4000 consumes the same quota as 100 requests with max_tokens=40. Check actual token usage in the API response — the "usage" field shows prompt_tokens and completion_tokens.

5. Upgrade your usage tier

OpenAI automatically increases your tier as you spend more. Tier 1 requires $5+ paid in the first month and gets 500 RPM for GPT-4. Tier 2 needs $50+ and gets 5,000 RPM. You can't pay to jump tiers — only actual API usage moves you up. Check your current tier at platform.openai.com/settings/organization/limits.

If you're stuck at Tier 1 with urgent needs, submit a request through the "Get higher rate limits" link on that same limits page. Include your use case, expected traffic, and why current limits block you. Approval takes 1-3 business days, and there's no guarantee.

If that doesn't work

Check whether you're getting 429 errors alongside "insufficient_quota" messages. That means you've run out of credits entirely, not just rate limits. Add billing details and credits at platform.openai.com/settings/organization/billing. More details in our OpenAI API error 429 and other API errors guide.

If you've implemented backoff, reduced token usage, and you're still getting constant 429s on a paid tier, contact OpenAI support through platform.openai.com/support. Include your organisation ID, the model you're using, your current tier, and example request timestamps. Response times vary from 24 hours to 5 days depending on support queue load. See how to contact OpenAI support for what details help get faster responses.

Questions people actually ask

Q: How long does a 429 rate limit last?

A: RPM limits reset every 60 seconds. If you hit 3 RPM at 14:00:30, you can send 3 more requests at 14:01:30. TPM limits reset every minute as well, but daily spending limits reset at midnight UTC.

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

A: No. ChatGPT Plus ($20/month) is separate from API access. API limits depend only on your API spending history and usage tier. Plus subscribers get the same API limits as free users unless they've spent separately on API credits.

Q: Can I pay extra to avoid rate limits?

A: Not directly. Higher rate limits come automatically as you use the API more and move through usage tiers. You can't buy Tier 5 access on day one — you have to spend $1,000+ over time to reach it.

What to remember

  • Check your exact limits at platform.openai.com/settings/organization/limits before changing code
  • Implement exponential backoff — wait 1s, 2s, 4s, 8s after each 429 error
  • Queue requests to stay under RPM — don't send 50 requests simultaneously on a 3 RPM limit
  • Reduce max_tokens in API calls to lower TPM usage
  • Usage tiers upgrade automatically with spending — you can't skip ahead by prepaying

---

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

Related help