Shipping an AI app or agent? Security review in 1 working day: $149 / ₹13,900. Request a review →
AI Review Ready
Home / Error fixes / OpenAI API 429
Fix · OpenAI API

OpenAI API error 429: rate limit or quota?

Fix: read error.code before anything else. A 429 for sending too fast clears if you wait (at least as long as Retry-After, when present) and slow down. A 429 with credit_balance_exhausted or a code ending in _limit_exceeded is a billing stop: retrying never helps, so add credits or raise the limit.

Which 429 do you have?

Message / codeCauseFix
Rate limit reached for requestsToo many requests or tokens in a short timeBack off and retry (below)
slow_down (type rate_limit_error)Your traffic grew faster than the service allows, even inside your RPM and TPMFollow Retry-After, cut the rate, ramp up gradually
credit_balance_exhaustedNo prepaid credits leftAdd credits in billing settings
organization_spend_limit_exceededThe organization hit the monthly spend limit you setRaise or remove it, or wait for the monthly reset
project_spend_limit_exceededOne project hit its own spend limit; other projects keep workingRaise or remove it in project settings
organization_usage_limit_exceededThe organization reached the monthly usage limit OpenAI assigned itRequest a higher approved limit, or contact support

For billing 429s the broader error.type can still read insufficient_quota, so check error.code. OpenAI's docs are explicit: retrying a billing, spend or quota error won't restore access.

Fix a rate-limit 429

  1. Wait as long as Retry-After says, then add a little random delay. Without the header, use exponential backoff with jitter and cap both attempts and total time.
  2. Know what the SDK already does. The official SDKs retry eligible 429 and 503 responses on their own. In Python the default is 2 retries:
    from openai import OpenAI
    
    client = OpenAI(max_retries=4)   # default 2; 0 turns SDK retries off
    If you write your own retry loop, turn SDK retries off or count them, or the two loops multiply your requests.
  3. Stop hammering. Failed requests count toward your per-minute limit, so instant resends make it worse.
  4. Set max_tokens close to the answer size you expect. The limit counts the larger of max_tokens and the estimated tokens of the request.
  5. Move work that can wait to the Batch API. It has its own queue limit and doesn't use your synchronous rate limits.
  6. Out of requests but not tokens? Put several tasks into one request to use your spare TPM.

Find your limits

Limits are set per organization and per project, not per user, and vary by model. Some model families share one limit, listed as a "shared limit" on Settings → Organization → Limits. Every response also carries the current state:

HeaderShows
x-ratelimit-remaining-requests / -tokensWhat is left before the limit
x-ratelimit-reset-requests / -tokensTime until it resets, e.g. 1s or 6m0s
x-ratelimit-*-project-tokensA project-level token limit, when one applies
Retry-AfterMinimum seconds to wait, on temporary 429s and overload 503s only

Usage tiers

Tiers rise automatically with total credit purchases, and higher tiers generally get higher rate limits:

TierQualifies atMonthly usage limit
FreeAllowed geography$100
Build$5 purchased$500
Launch$100 purchased$5,000
Grow$500 purchased$200,000

The slow_down ramp rule

OpenAI's rule of thumb: once traffic reaches 1 million input tokens per minute, raise it by no more than 50% every 15 minutes. The exact point varies by model and traffic, so ramp new jobs up instead of starting them at full speed.

Still failing?

  • Check the key belongs to the organization and project you think it does: a forgotten project with its own spend limit gives a 429 while the rest of the account looks fine.
  • A 503 with server_is_overloaded is model capacity, not your limit. Check status.openai.com.
  • For support, collect the exact message, error.code, request IDs (the x-request-id header; _request_id in the Python SDK), a timestamp with time zone and the limit involved. Never include the API key.

Running Claude Code, Codex or Cursor on real repos, or shipping an AI agent? A Quick Review ($149 / ₹13,900, 1 working day) checks one repo, config or setup for leaked keys, risky agent permissions and MCP servers. Request a Quick Review

FAQ

What does 'insufficient_quota' mean in an OpenAI 429?

It is the broad error type OpenAI can still use for billing errors. Read error.code to see which one: credit_balance_exhausted, a spend limit or the usage limit. Retrying won't fix any of them.

Do failed requests count toward OpenAI rate limits?

Yes. OpenAI's rate-limit guide says unsuccessful requests count toward your per-minute limit, so resending in a tight loop doesn't work.

How many times does the OpenAI Python SDK retry a 429?

Twice by default. Change it with max_retries on the client or per request; 0 disables retries.

How do I get a higher OpenAI rate limit?

Usage tiers upgrade automatically as total credit purchases grow: Build at $5, Launch at $100, Grow at $500. Project limits are set by your organization owner.

Related errors

Sources

Read 30 Nov 2026. These tools change often: if a step no longer matches, the linked page wins.

Related free tools