OpenAI API 429 rate limit how to fix

You're getting Error 429: Rate limit reached for requests in your API calls, and your integration just stopped working. This hits developers hardest during peak usage hours or when testing new features with rapid API cal

OpenAI API 429 rate limit how to fix

You're getting `Error 429: Rate limit reached for requests` in your API calls, and your integration just stopped working. This hits developers hardest during peak usage hours or when testing new features with rapid API calls.

What's actually happening

The OpenAI API enforces two types of rate limits: requests per minute (RPM) and tokens per minute (TPM). When you exceed either limit, the API returns a 429 status code and blocks your request temporarily. The error message usually includes specifics like `Rate limit reached for gpt-4 in organization org-xxxxx on requests per minute (RPM): Limit 500, Used 500, Requested 1`.

Your rate limits depend on your usage tier, which OpenAI assigns based on your total spend over the past month. New accounts start at Tier 1 with minimal limits — sometimes just 3 RPM for GPT-4. As you spend more ($5 gets you to Tier 2, $50 to Tier 3), your limits increase. Free trial accounts have the lowest limits and hit 429 errors constantly under any real load.

The API includes rate limit headers in every response: `x-ratelimit-limit-requests`, `x-ratelimit-remaining-requests`, and `x-ratelimit-reset-requests`. If you're not checking these headers, you're flying blind.

How to fix it

1. Check your current limits

Go to platform.openai.com/settings/organization/limits and log in. You'll see exact RPM and TPM limits for each model. Note your usage tier — it's listed at the top. If you're at Tier 1 or 2, your limits are probably too low for production use.

2. Implement exponential backoff

Add retry logic to your code. When you hit a 429, wait before retrying. Start with 1 second, then double each time: 2s, 4s, 8s. The API's `Retry-After` header tells you exactly how long to wait. Most libraries have built-in retry handlers — the official OpenAI Python library does this automatically if you set `max_retries=3`.

3. Add request queuing

Don't fire all requests simultaneously. Use a queue system that respects your RPM limit. If you have 500 RPM, send at most 8 requests per second (500 ÷ 60). Libraries like `bottleneck` for Node.js or Python's `asyncio.Semaphore` work well here.

4. Monitor your token usage

TPM limits fail differently than RPM. You might send just 10 requests per minute but hit the token limit if each request uses 15,000 tokens. Check `x-ratelimit-limit-tokens` headers and count tokens before sending — use `tiktoken` for accurate counts.

5. Increase your tier

If you legitimately need higher limits, spend more. Add $50 to your account balance to reach Tier 3, which typically gives you 5,000 RPM for GPT-4. Go to platform.openai.com/settings/organization/billing and add credits. Tier upgrades happen automatically but can take 24 hours to reflect.

If backoff logic still doesn't solve it, you're probably hitting other API errors too. Check our guide on OpenAI API error 429 and other API errors for 401, 500, and quota issues.

If that doesn't work

Contact OpenAI support at help.openai.com and request a limit increase. Include your organization ID (from platform.openai.com/settings/organization/general), specific models you're using, your use case, and current error rates. They typically respond in 2-3 business days but rarely grant increases unless you're at Tier 4+ or spending thousands monthly.

If you're hitting limits during legitimate testing, you might have a billing issue. See our unexpected OpenAI charge guide if your account shows unexpected balances or tier downgrades. For any account access problems, check how to contact OpenAI support for the fastest response channels.

Questions people actually ask

Q: Do rate limits reset immediately after the time window?

A: No. OpenAI uses a sliding window, not a fixed reset. If you use 500 requests at 2:00 PM with a 500 RPM limit, you can't send another 500 at 2:01 PM. Each request's quota returns exactly 60 seconds after you made it.

Q: Can I pay to remove rate limits entirely?

A: No. Even Tier 5 accounts have limits — they're just much higher (10,000+ RPM). Rate limits exist to prevent abuse and ensure service stability for all users.

Q: Why do I hit TPM limits with small prompts?

A: Response tokens count toward TPM, not just your prompt. A 500-token prompt might generate a 3,000-token response, using 3,500 tokens total against your limit.

What to remember

  • Rate limits vary by model, usage tier, and account age — check platform.openai.com/settings/organization/limits for exact numbers
  • Implement exponential backoff with the `Retry-After` header value before retrying failed requests
  • Monitor both RPM and TPM limits using response headers in every API call
  • Increase your usage tier by spending more — $50 total spend gets you to Tier 3 with workable limits
  • Use request queuing to stay under limits proactively instead of hitting 429 errors repeatedly

---

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

Related help