Claude Code error
Claude Code: API Error: Usage credits required for 1M context · run /usage-credits...
API Error: Usage credits required for 1M context · run /usage-credits to turn them on (they take effect after you restart Claude Code), or /model to switch to standard contextStatus: By designLast verified 4 documented fixes2 sources
What it means
The selected model uses the 1M-token extended context window and your plan only includes it through usage credits. This is an entitlement check, not quota exhaustion, and fires even when session and weekly allowances have capacity.
Causes
- Explicitly selecting a [1m] model on a plan that includes 1M context only via usage credits
- A 1M model ID set elsewhere in configuration
How to fix it
- Fix 1.
Run /model and select the variant without the [1m] suffix.
Slash command/model - Fix 2.
Run /usage-credits to turn on metered billing for the 1M variant (Pro and Max) or request credits from your admin, then restart Claude Code.
Slash command/usage-credits - Fix 3.
To remove 1M variants from the model picker entirely, set CLAUDE_CODE_DISABLE_1M_CONTEXT=1.
TOMLCLAUDE_CODE_DISABLE_1M_CONTEXT=1 - Fix 4.
On versions before v2.1.172, the error repeated on every request including /compact; run /clear on those versions.
Slash command/clear
More Claude Code errors
All 18 Claude Code errorsAPI Error: 500 Internal server error. This is a server-side issue, usually temporaryStatus: WorkaroundAPI Error: Repeated 529 Overloaded errors. The API is at capacityStatus: WorkaroundAPI Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.5: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01FRvEykWmCgrgJ22mvBbKhV. Each `tool_use` block must have a corresponding `tool_result` block in the next message."}}Status: OpenUnable to connect to API. Check your internet connectionStatus: WorkaroundUnable to connect to API: SSL certificate verification failed (UNABLE_TO_GET_ISSUER_CERT_LOCALLY).Status: WorkaroundPlease run /login · API Error: 401 OAuth token has expiredStatus: WorkaroundOAuth error: timeout of 15000ms exceededStatus: OpenPrompt is too longStatus: Workaround
Related reading
- Claude Max API Credits: $100 a Month, What They CoverClaude Max and Team plans now include a monthly Claude API credit, starting at $100 on Max 5x. What it covers, what it does not, and how to claim it.
- AGENTS.md Files Don't Move Coding Agent Correctness: A 288-Run AblationAGENTS.md and context files do not measurably change coding agent correctness in a 288-run Claude Code and Codex ablation. Failures were implementation skill.
- Anthropic Removed 80% of Claude Code's System Prompt. Here Is What They Learned.Anthropic cut over 80% of Claude Code's system prompt for Claude 5 models with no coding eval loss. The new context engineering rules and what HN thinks.
- The New Rules of Context Engineering for Claude 5 Models: A Developer GuideAnthropic removed over 80% of Claude Code's system prompt for Claude 5 models. Here is how the rules changed and what it means for your CLAUDE.md files, skills, and system prompts.
- Claude Usage Limits With Fable 5: Windows and Burn RatesFable 5 drains Claude's 5-hour rolling usage window far faster than Opus or Sonnet. What the plan multipliers mean, the June 22 change, and how to make it last.
- Local Code Graphs Are the Agent Context LayerCodeGraph builds a local, queryable repo map that coding agents reach through MCP. The win is faster orientation, fewer wrong files and better review receipts.
FAQ
What does "API Error: Usage credits required for 1M context · run /usage-credits..." mean in Claude Code?
The selected model uses the 1M-token extended context window and your plan only includes it through usage credits. This is an entitlement check, not quota exhaustion, and fires even when session and weekly allowances have capacity.
How do I fix "API Error: Usage credits required for 1M context · run /usage-credits..."?
There are 4 documented fixes. Start with the first: Run /model and select the variant without the [1m] suffix.
Is this Claude Code error fixed?
Status: By design. Expected behavior, not a bug. The documented fixes change the setup that triggers it. Affected versions: Before v2.1.172 the error looped mid-conversation; message wording updated in v2.1.268; v2.1.113 fixed compacting a resumed long-context session failing with "Extra usage is required for long context requests".
Sources
Last verified against 2 sources: official docs, maintainer replies and release notes.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.