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 hard during peak usage or when testing new features—your requests get blocked beca

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 hard during peak usage or when testing new features—your requests get blocked because you've exceeded OpenAI's request limits for your current tier.

What's actually happening

The 429 error means you've hit one of OpenAI's rate limits. OpenAI enforces three types of limits on every API key: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). When you exceed any of these, the API responds with `429 Too Many Requests` and includes specific details in the error message.

The error response looks like this: `Rate limit reached for gpt-4 in organization org-xxxxx on requests per min (RPM): Limit 3, Used 3, Requested 1`. That tells you exactly which limit you hit. New free-tier accounts get extremely low limits—often just 3 RPM for GPT-4. Paid accounts on usage tiers get progressively higher limits as you spend more over time.

Your tier determines your limits. Tier 1 (new paid accounts) might get 500 RPM for GPT-3.5-turbo but only 10 RPM for GPT-4o. Tier 5 (accounts that have spent $1,000+) gets 10,000 RPM. You can't just pay to increase limits immediately—OpenAI raises them automatically as you use the API over weeks and months.

How to fix it

1. Check your current limits

Go to platform.openai.com/settings/organization/limits. You'll see your exact RPM, TPM, and RPD limits for each model. Compare these to what your application actually needs. If you're hitting 3 RPM on GPT-4 but making 20 calls per minute, you've found your problem.

2. Implement exponential backoff

Add retry logic to your code. When you get a 429 error, wait before retrying—start with 1 second, then 2, then 4, doubling each time. The API response includes a `Retry-After` header that tells you exactly how long to wait. Most Python libraries like `openai` and `langchain` support automatic retries, but you need to enable them explicitly.

3. Batch your requests

If you're making many small API calls, combine them. Instead of 50 separate requests to analyze individual sentences, send one request with all 50 sentences in the prompt. You'll use the same tokens but only one request slot. This works especially well for GPT-3.5-turbo calls where you have high TPM but low RPM.

4. Switch models strategically

Use GPT-3.5-turbo for tasks that don't need GPT-4's reasoning. Your RPM limits are much higher for cheaper models. If you're hitting GPT-4 limits at 10 RPM but have 500 RPM available for GPT-3.5-turbo, route simpler requests to the faster model.

5. Request a limit increase

Click "Request limit increase" on the limits page. Fill out the form explaining your use case, expected traffic, and how you'll handle the higher limits responsibly. OpenAI typically responds in 3-5 business days, but they don't guarantee approval—especially for new accounts. For more details on working with OpenAI's support team, check out how to contact OpenAI support.

If that doesn't work

If you've implemented all the fixes above and still hit limits constantly, you need to fundamentally reduce your request volume. Add caching so you don't re-process identical inputs. Queue requests during off-peak hours. Consider preprocessing data to reduce API calls.

For billing issues that might be affecting your tier status, see unexpected OpenAI charge refund guide. If you're seeing other API errors alongside 429s, read the comprehensive OpenAI API error 429 and other API errors guide.

Email support at help.openai.com with your organization ID (from platform.openai.com/settings/organization/general), the specific error message text, your current tier, and screenshots of your usage dashboard. They can sometimes manually review accounts stuck at low tiers, but don't expect instant tier upgrades—their system is mostly automated.

Questions people actually ask

Q: How long until my limits reset?

A: RPM limits reset every 60 seconds. TPM limits also reset per minute. RPD limits reset at midnight UTC. The `Retry-After` header tells you the exact wait time.

Q: Will adding my credit card increase limits immediately?

A: No. New paid accounts start at Tier 1 regardless of payment method. You advance tiers by spending money over time—Tier 2 needs $50 spent, Tier 3 needs $100, and so on.

Q: Can I use multiple API keys to get around limits?

A: No. Limits apply per organization, not per key. Creating multiple accounts to bypass limits violates OpenAI's terms of service and risks getting all your accounts banned.

What to remember

  • Check platform.openai.com/settings/organization/limits for your exact current limits
  • Implement exponential backoff with the `Retry-After` header value
  • Batch multiple requests together to reduce RPM usage
  • Use GPT-3.5-turbo instead of GPT-4 where possible—limits are 10-50x higher
  • Tier upgrades happen automatically based on spending over time, not on request

---

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

Related help