AI API errors / OpenAI
OpenAI · HTTP 429 · checked Oct 24, 2026
OpenAI 429 insufficient_quota: what it means and how to fix it
Do not retry: fix it first429 insufficient_quota: You exceeded your current quota, please check your plan and billing details.
What it meansNot a rate limit: the account is out of money or hit a limit. Check error.code: credit_balance_exhausted (no prepaid credits), organization_spend_limit_exceeded or project_spend_limit_exceeded (a limit you set), or organization_usage_limit_exceeded (OpenAI's monthly cap for your org).
How to fix it
- Add credits in billing settings, or raise the spend limit you set (organization or project).
- For
organization_usage_limit_exceeded, request a higher approved limit. - Do not retry in a loop: these errors never clear until billing or limits change.
Handle it in code
from openai import OpenAI, RateLimitError, InternalServerError
# The SDK retries some errors with backoff; quota and billing errors never clear by retrying.
client = OpenAI(max_retries=6)
try:
r = client.responses.create(model="gpt-5", input="Hello")
except RateLimitError as e: # 429: check e.code for quota vs rate limit
if getattr(e, "code", None) in ("insufficient_quota", "credit_balance_exhausted"):
raise # fix billing, do not retry
except InternalServerError: # 500 / 503 server_is_overloaded
pass # retry later or fall back to another modelThe official SDKs retry some errors automatically (max_retries); billing and quota errors never clear by retrying.
Same kind of error at other providers
- Anthropic 402 billing_error
- Google Gemini API 400 FAILED_PRECONDITION
- Google Gemini API 402 payment_required
Other OpenAI errors
- 429rate_limit_error: Rate limit reached for requestsretry
- 429slow_down: Slow downretry
- 401invalid_api_key: Incorrect API key providedfix
- 401invalid_authentication: Invalid Authenticationfix
- 401ip_not_authorized: IP not authorizedfix
- 401You must be a member of an organization to use the APIfix
- 403unsupported_country_region_territory: Country, region, or territory not supportedfix
- 500server_error: The server had an error while processing your requestretry
- 503server_is_overloadedretry
- 400invalid_request_errorfix
Source
- OpenAI error documentation: developers.openai.com/api/docs/guides/error-codes (checked Oct 24, 2026)
Paying too much per call while you are here? Compare AI model prices or estimate your bill.
Up next
Paste any errorEvery AI API error, retry or fixAnthropic, OpenAI and Gemini in one finder.Read it next →Also worth your time
Did this answer your question?
Up next
Get 3 picks for your job, volume and budgetPick an AI model for your jobLLM API pricing for 71 models per 1M tokens, checked at the source. Pick for me: your job, volume and budget give 3 models with the monthly cost. Filters, CSV.Read it next →