OpenAI API error 429 rate limit fix

You're hitting "Error 429: Rate limit reached" when calling the OpenAI API, and your application just stops working. This happens when you've exceeded your requests-per-minute (RPM) or tokens-per-minute (TPM) quota for y

OpenAI API error 429 rate limit fix

You're hitting "Error 429: Rate limit reached" when calling the OpenAI API, and your application just stops working. This happens when you've exceeded your requests-per-minute (RPM) or tokens-per-minute (TPM) quota for your current pricing tier.

What's actually happening

Error 429 means you're making API calls faster than OpenAI allows for your usage tier. Every API key has strict rate limits based on your account's payment history and current plan. New accounts start with severely restricted limits — often just 3 requests per minute on GPT-4 or 200 requests per minute on GPT-3.5-turbo.

The exact error message looks like this:

```

{

"error": {

"message": "Rate limit reached for requests",

"type": "requests",

"code": "rate_limit_exceeded"

}

}

```

You'll also see variations mentioning "tokens" instead of "requests" — that means you've hit your TPM limit, not RPM. Both are hard caps that reset every minute. OpenAI doesn't queue your requests or slow them down gradually. You hit the limit, you get rejected immediately.

Your rate limits increase automatically as you spend more money through the API. Spend $50 in approved usage, and your limits jump significantly. But there's no way to instantly buy higher limits — you have to earn them through consistent billing history.

How to fix it

1. Check your actual rate limits

Go to platform.openai.com/settings/organization/limits. You'll see your exact RPM and TPM caps for each model. These numbers are what matter, not what you think they should be.

2. Add exponential backoff to your code

When you receive a 429 error, wait before retrying. Start with 1 second, then double it each time: 1s, 2s, 4s, 8s. Most API libraries have built-in retry logic. In Python with the official OpenAI library, add:

```python

from openai import OpenAI

client = OpenAI(max_retries=3)

```

This handles 429s automatically with exponential backoff.

3. Implement request queuing

If you're processing batches, don't fire all requests simultaneously. Add a delay between calls. For a 3 RPM limit, wait 20+ seconds between requests. For higher limits, calculate: 60 seconds ÷ your RPM limit = minimum seconds between requests.

4. Switch to batch processing for non-urgent tasks

The Batch API (platform.openai.com/batches) has separate, much higher limits and costs 50% less. Upload a JSONL file with all your requests, and OpenAI processes them within 24 hours. You can submit millions of tokens this way without hitting standard rate limits.

5. Request a rate limit increase

If you're consistently hitting limits and have strong billing history, go to platform.openai.com/settings/organization/limits and click "Request increase" next to the specific model. Include your use case and expected traffic. Approval isn't guaranteed and takes 3-7 days minimum. New accounts with no payment history get rejected automatically.

If none of this works and you're seeing 429s on a paid account with normal usage, you might be hitting a different API issue — check the full guide to OpenAI API error codes for 401, 500, and insufficient_quota errors.

If that doesn't work

Contact OpenAI support through platform.openai.com/account/support. Click "Create a support request" and select "API rate limits" as the category. Include:

  • Your organization ID (from platform.openai.com/settings/organization/general)
  • The specific model hitting 429s (gpt-4, gpt-3.5-turbo, etc.)
  • Your current limits and how much you need
  • Your use case in 2-3 sentences
  • Your total API spend to date

Response time is typically 2-4 business days. If you need faster help with account issues, see how to contact OpenAI support for all available channels.

Questions people actually ask

Q: Can I pay to immediately increase my rate limits?

A: No. OpenAI increases limits based on payment history over time, usually after you've spent $50+ through the API. You can't pay a one-time fee to jump tiers.

Q: Why do I have different limits for GPT-4 vs GPT-3.5?

A: Each model has separate rate limits. GPT-4 starts much lower (3 RPM for new accounts) because it's more expensive and resource-intensive. Your GPT-3.5 limits don't affect GPT-4.

Q: My dashboard shows I'm under the limit but I'm still getting 429s. Why?

A: The dashboard shows daily totals. Rate limits are per-minute caps. You might use 100 requests in one minute and 0 in the next 59 — you'd still hit the 60 RPM limit even though your daily usage looks fine.

What to remember

  • Rate limits are per-minute hard caps, not daily quotas — pace your requests evenly
  • Check platform.openai.com/settings/organization/limits for your exact current limits
  • Implement exponential backoff in your code to handle 429s automatically
  • Use the Batch API for large non-urgent jobs — it's cheaper and has separate limits
  • Limits increase automatically as you build payment history, typically after $50+ in approved usage

---

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

Related help