LLM errors and usage limits
One guide per error message or usage limit: what it means and how to get past it.
API errors
- 429: rate limit or spent balanceLLM API 429 errors: rate limits, spent balances and the fixA 429 from an LLM API can mean you sent too much or your prepaid balance is gone. How to tell them apart, when to back off, when never to retry, with Python.
- The request is too large for the modelcontext_length_exceeded: causes and a code fix for LLM APIscontext_length_exceeded means your prompt plus reserved output no longer fits the model. How to read the error, how Anthropic differs, and Python that trims history and retries.
- The response stops earlyfinish_reason length: why LLM responses get cut offfinish_reason: length means the model hit your token limit mid-answer. Anthropic's equivalent stop reasons, how reasoning tokens eat the output budget, and Python to continue a cut-off response.
- The account has no quota leftinsufficient_quota: fixing OpenAI's 429 billing errorinsufficient_quota is a 429 that waiting will not fix. How it differs from a rate limit, which error codes to check, and Python that keeps billing errors out of your retry loop.
- The provider is overloadedoverloaded_error (529): handling Claude API overloadsClaude's overloaded_error is an HTTP 529 meaning the API is temporarily overloaded. How it differs from 429, why it can arrive mid-stream, and Python for backoff and falling back to another model.
- The key is rejectedinvalid_api_key (401): Incorrect API key provided, fixedA 401 with invalid_api_key or Incorrect API key provided means a bad key or header. How Anthropic's authentication_error differs, the usual causes, and a curl check that isolates the problem.
- The model id is wrongmodel_not_found (404): The model does not exist, fixedA 404 model_not_found means the model ID does not exist or your key cannot use it. The usual causes, Anthropic's not_found_error, and how to get the right ID from the models endpoint.
Chat and usage limits
- The conversation is too longWhat is a context window? LLM limits and how to stay inside themA context window is the most tokens an LLM can handle in one request. What fills it, what happens at the limit, and how to trim, summarize and cache your way back under.
- ChatGPT usage limitsChatGPT Limit Reached: Reset Times and How to Keep WorkingReached a limit in ChatGPT? How limits differ by plan, model and feature, where the reset time appears, what actually restores access, and how to keep working on another model in the browser.
- Claude usage limitsClaude Usage Limit Reached: Reset Times and How to Keep WorkingHit a Claude usage limit? How the five-hour and weekly limits count, what each message means, when they reset, and the ways to keep working, including running Claude Code on a prepaid API key.
- Codex usage limitsCodex Usage Limit Reached: What It Means and How to Keep WorkingCodex says you've hit your usage limit? How the five-hour and weekly windows work on ChatGPT plans, where to see your reset time, and the ways to continue, including Codex CLI on a prepaid API key.
- Cursor usage limitsCursor Usage Limit Reached: Reset Dates and How to Keep WorkingOut of usage in Cursor? How The X Subscription and legacy plans differ, when each one resets, where to check, and how to keep working, including the rules for using your own API key.
Gemini error codes
Next step
Ready to send a request? Getting started →