OpenAI API 429 rate limit how to fix

You're getting error 429 from the OpenAI API, and your application just stopped working. This hits developers hard during peak usage or when testing new features — the API simply refuses your requests with "Rate limit re

OpenAI API 429 rate limit how to fix

You're getting error 429 from the OpenAI API, and your application just stopped working. This hits developers hard during peak usage or when testing new features — the API simply refuses your requests with "Rate limit reached for requests."

What's actually happening

The 429 error means you've exceeded OpenAI's rate limits for your tier. The API tracks three separate limits: requests per minute (RPM), tokens per minute (TPM), and requests per day (RPD). When you cross any threshold, the API blocks further requests until your quota resets.

Your tier determines these limits. Free tier accounts get severely restricted access — often just 3 requests per minute on GPT-4 models. Tier 1 (after your first successful payment) increases this to 500 RPM for GPT-3.5-turbo but only 10,000 TPM for GPT-4. Higher tiers (2-5) unlock progressively larger quotas, but you need to spend more on API usage to qualify for tier upgrades.

The error response includes specific headers telling you exactly what limit you hit. Look for `x-ratelimit-limit-requests`, `x-ratelimit-remaining-requests`, and `x-ratelimit-reset-requests` in your API response headers. These show your limit, how many you have left, and when the counter resets.

How to fix it

1. Check your current tier limits

Log into platform.openai.com and click "Settings" in the left sidebar, then "Limits." This page shows your exact RPM, TPM, and RPD limits for each model. Compare these numbers against your application's request volume.

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, 4, 8, and so on. Most API libraries support this automatically. For Python's `openai` library, wrap calls in a try-except block:

```python

import time

for i in range(5):

try:

response = client.chat.completions.create(...)

break

except openai.RateLimitError:

time.sleep(2 ** i)

```

3. Reduce your token usage

Each API call consumes tokens from your TPM limit — both input and output count. Shorten your prompts, reduce `max_tokens` in your requests, or switch to cheaper models like GPT-3.5-turbo for non-critical tasks. A single GPT-4 call with a 4,000-token context can burn through 40% of a Tier 1 TPM limit.

4. Batch requests if possible

Instead of making 100 separate API calls, combine prompts where it makes sense. Send multiple questions in one request, or use the Batch API for non-urgent tasks — it processes requests overnight with 50% lower costs and separate rate limits.

5. Upgrade your usage tier

Spend more on API usage to automatically move up tiers. Tier 2 requires $50+ paid, Tier 3 needs $100+, and Tier 4 requires $250+. Each tier dramatically increases your limits. Visit platform.openai.com/settings/organization/limits to see your current tier and spending needed for the next level.

If you need immediate relief and can't wait for automatic tier progression, there's no manual override — you must either reduce usage or wait for quota resets.

If that doesn't work

Contact OpenAI through platform.openai.com — click the question mark icon in the bottom right, then "Messages." Include your organization ID (from Settings > Organization), the exact error message, your current tier, and what you're building. Response times vary from 24 hours to several days depending on support volume.

For persistent issues beyond standard API 429 errors, check if you've hit a different limit type. Some users report unexpected restrictions even within their tier limits, which requires support intervention. Keep detailed logs of your request timestamps and error responses to send to OpenAI. For billing disputes related to usage overages, see the guide on unexpected OpenAI charges.

Questions people actually ask

Q: How long until my rate limit resets?

A: RPM limits reset every 60 seconds. TPM limits refill continuously as tokens "age out" of the rolling window. Check the `x-ratelimit-reset-requests` header in the error response for the exact reset time in Unix timestamp format.

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

A: No. Tier upgrades happen automatically based on your cumulative spending, not one-time payments. You can't buy your way to Tier 5 instantly — you must gradually spend the required amounts while following your current limits.

Q: Does ChatGPT Plus affect my API limits?

A: No. ChatGPT Plus ($20/month) and API access are completely separate products with different billing and limits. A Plus subscription doesn't increase your API tier or quotas.

What to remember

  • Check platform.openai.com/settings/organization/limits for your exact tier and quotas
  • Implement exponential backoff in all API calls — don't hammer the endpoint
  • Monitor both RPM and TPM limits — hitting either triggers 429 errors
  • Tier upgrades require cumulative spending over time, not instant payments
  • Free tier gets severely restricted access — upgrade to Tier 1 immediately for serious projects

---

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

Related help