OpenAI API error 429 rate limit exceeded

You're getting "Error 429: Rate limit reached" when calling the OpenAI API, and your application has stopped working. This happens when you've sent too many requests in a short time, and it's one of the most common error

OpenAI API error 429 rate limit exceeded

You're getting "Error 429: Rate limit reached" when calling the OpenAI API, and your application has stopped working. This happens when you've sent too many requests in a short time, and it's one of the most common errors developers hit.

What's actually happening

The OpenAI API limits how many requests you can make per minute (RPM) and how many tokens you can process per minute (TPM). When you exceed either limit, the API returns a 429 error and blocks your requests temporarily.

Your exact limits depend on your usage tier. New accounts start at Tier 1 with strict limits — for GPT-4, that's typically 500 requests per minute and 30,000 tokens per minute. If you've spent at least $5, you move to Tier 2 with higher limits. The tiers go up to Tier 5 for accounts that have spent $1,000+ over time.

The error message usually looks like this: `Rate limit reached for requests` or `Rate limit reached for tokens`. Sometimes you'll see specific numbers like `Limit: 3 requests per min`. The API also returns a `Retry-After` header telling you how many seconds to wait before trying again.

How to fix it

1. Check your current tier and limits

Log into platform.openai.com and go to Settings → Limits. You'll see your current tier and the exact RPM and TPM limits for each model. Compare these to your application's request volume.

2. Add exponential backoff to your code

Your application should catch 429 errors and automatically retry with increasing delays. Here's the pattern:

  • First retry: wait 1 second
  • Second retry: wait 2 seconds
  • Third retry: wait 4 seconds
  • Continue doubling up to 60 seconds maximum

Most OpenAI SDKs include retry logic, but if you're using raw HTTP requests, you need to build this yourself. Check the `Retry-After` header in the response and wait at least that long.

3. Implement request batching

If you're making many small requests, combine them. Send multiple prompts in one API call using JSON arrays, or use the batch API endpoint for non-urgent requests. Batching reduces your total request count while processing the same amount of data.

4. Reduce your token usage

Each API call counts tokens in both the prompt and completion. Use shorter system messages, remove unnecessary examples from few-shot prompts, and set lower `max_tokens` values. You can preview token counts at platform.openai.com/tokenizer before sending requests.

5. Spread requests over time

If you're processing large datasets, don't send everything at once. Add delays between requests (at least 60 seconds divided by your RPM limit). Use a queue system to distribute requests evenly across each minute.

If that doesn't work

You can request a rate limit increase through platform.openai.com. Click Settings → Limits, then scroll down and click "Request increase". You'll need to explain your use case, expected request volume, and how you're implementing error handling.

OpenAI typically reviews these requests within 7-10 business days. They're more likely to approve if you've been using the API consistently, have a clear business need, and show you're handling errors properly. Include specific numbers: "We need 2,000 RPM for GPT-4 to process customer support tickets during business hours."

If you're hitting limits during development and testing, consider using GPT-3.5-turbo instead of GPT-4. It has much higher rate limits and costs less, making it better for testing your error handling and request logic. Switch to GPT-4 only for production traffic.

For more details on other API errors like authentication failures or quota issues, see OpenAI API error 429 and other API errors. If you need to escalate to OpenAI directly, check how to contact OpenAI support.

Questions people actually ask

Q: How long does a 429 error last?

A: The block resets at the start of the next minute for RPM limits or when your token count rolls over for TPM limits. You're not banned — just throttled temporarily.

Q: Does upgrading to a paid plan increase rate limits?

A: Not automatically. Rate limits increase based on your usage tier, which is determined by how much you've spent total on the API over time. Tier 1 requires $5 spent, Tier 2 needs $50, and so on.

Q: Can I pay for higher rate limits immediately?

A: No. You need to build spending history over time to reach higher tiers. There's no way to buy your way to Tier 5 limits on day one.

What to remember

  • Check your exact limits at platform.openai.com Settings → Limits
  • Implement exponential backoff with the `Retry-After` header
  • Batch multiple requests together to reduce total RPM usage
  • Usage tier increases automatically as you spend more over time
  • Request limit increases through the platform with specific use case details

---

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

Related help