OpenAI API insufficient_quota vs OpenAI API rate_limit_exceeded
The difference
Both are HTTP 429 RateLimitError. insufficient_quota is billing and never clears by waiting; rate_limit_exceeded is a per-minute limit that clears in seconds.
| insufficient_quota OpenAI API · You exceeded your current quota | rate_limit_exceeded OpenAI API · Rate limit reached (TPM/RPM) | |
|---|---|---|
| error.code | insufficient_quota | rate_limit_exceeded |
| Cause | No credit left, or the budget is reached | Too many requests or tokens this minute |
| Retry? | No: add credit or raise the budget | Yes: back off, honour the suggested delay |
| Who fixes it | Whoever owns billing | The code (pacing, concurrency) |
| Alert as | Billing incident, page immediately | Capacity warning, alert on sustained rate |
Which one do I have?
- Check error.code in the body: the status alone cannot tell them apart.
- If waiting a minute fixes it, it was rate_limit_exceeded.
- If every request fails, including tiny ones, check the project’s credit balance and budget.