Claude Code: API pricing or a subscription?
Last updated
Short answer: A subscription is a flat price with usage limits: Pro is $20 a month ($17 billed annually), Max is $100 and Ultra (formerly Max 20x) is $200, and Claude Code shares the plan's limits (verified Ultra accounts have no five-hour limit since Oct 30, 2026). The API route bills per token with no hard stop. Anthropic's enterprise average is around $13 per developer per active day, but it says costs vary widely, so it publishes no break-even point.
The subscription route
claude.com/pricing says Claude Code is included in all paid plans and "shares the same usage limits as the rest of your plan". Pro is $17 a month with the annual discount ($200 billed up front) or $20 billed monthly; Max is $100 a month and Ultra (renamed from Max 20x on Oct 30, 2026) is $200. Pro and Max have a five-hour session limit and a weekly limit; verified Ultra accounts have only the weekly limit. Anthropic gives weekly multipliers (Max 5x, Ultra 10x Pro) but no fixed number (see our weekly-limit page).
The API route
Claude Code's costs docs say it "charges by API token consumption". Anthropic's support table for API-key sign-in (Console, Bedrock, Vertex or Microsoft Foundry) says: "Pay-as-you-go, billed per token to that cloud or Console account. No hard stop; the account is charged for what it uses." You can set spend limits yourself; the costs docs describe team and workspace spend limits. Example standard rates from Anthropic's pricing table (checked Oct 27, 2026): Sonnet 5.5 is $2 per million input tokens and $10 per million output tokens; Opus 5.5 is $4 and $20. Other models and modifiers such as caching, batch and fast mode cost differently.
What it costs in practice
Anthropic's costs page says: "Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users." It also says per-developer costs vary widely with model, codebase size and usage patterns, and suggests starting with a small pilot. That is an enterprise average, not a quote for you. Anthropic doesn't publish a break-even between a plan and the API, and we don't compute one.
Two traps to check
First, if an ANTHROPIC_API_KEY environment variable is set, Claude Code uses that key instead of your subscription, which means API charges. In interactive mode it asks once whether to approve the key; in non-interactive mode (-p) the key is always used when present. Second, the monthly API credits that come with Max can't be used in Claude Code or the Claude apps, including for usage credits (Claude Help Center article 11145838). Usage credits on a plan are billed at standard API rates.
Sources
- Claude pricing (Pro and Max prices, Claude Code included and shares plan limits), checked 2026-10-27
- Claude support: what is the Max plan (Max $100; Max 20x is now Ultra at $200), checked 2026-10-27
- Claude support: use Claude Code with Pro or Max (limits, API key precedence, Max API credits), checked 2026-10-27
- Claude Code docs: manage costs (per-token billing, enterprise average, spend limits), checked 2026-10-27
- Claude support: models, usage and limits in Claude Code (API key: pay-as-you-go, no hard stop), checked 2026-10-27
- Claude API pricing (per-million-token rates), checked 2026-10-27
- Claude Code docs: authentication (API key approval prompt, -p mode), checked 2026-10-27
- Claude support: usage credits (billed at standard API rates), checked 2026-10-27
Free PDF: the AI Coding Cost Cheat Sheet. Enter your email to download it, plus one email a week when picks or prices move.
FAQ
Is Claude Code cheaper on the API or with Max?
It depends on how many tokens you use, and Anthropic publishes no break-even. Its enterprise average is around $13 per developer per active day, and below $30 per active day for 90% of users, but it says costs vary widely. If you use it most days, compare that range with Max at $100 or $200 a month.
Does Claude Code use my API key or my Pro/Max subscription?
If ANTHROPIC_API_KEY is set, interactive Claude Code asks once whether to use it and, if you approve, bills that key at API rates instead of your subscription. In non-interactive mode (-p) the key is always used when present, with no prompt.
Can I use Max's included API credits in Claude Code?
No. Anthropic's support article 11145838 says monthly API credits included with Max can't be used in Claude Code or the Claude apps, including for usage credits.
Is there a usage cap on the API route?
Not by default. Anthropic says API-key usage has "no hard stop" and the account is charged for what it uses, but you can set spend limits in the Console.
Next steps
- Claude Code pricing full plan breakdown
- Claude Code weekly limit how the limits work
- Is Claude Code free? which plans include it
- Codex Plus vs Claude Pro vs Cursor Premium three ~$20 plans compared
- Claude Code Opus 4.8 fast mode deprecated October 30; removed November 30, 2026
- Claude Code background subagent usage Nov 4 ClaudeDevs 99% status-update claim
- Can you use Vercel's free Hobby plan for a commercial app?
- Is Railway free?
- Does n8n have a free plan?
- X Super vs Claude Max for coding: should you switch from Claude Code?
- Codex Plus, Claude Pro, Cursor Premium or Google AI Pro: which AI coding subscription is the best value?
- Is Claude Code free?
- What is the Claude Code weekly limit?
- Claude Pro vs Max vs Ultra: which plan for Claude Code?
- Does ChatGPT Pro include API credits? Can you use them in Codex?
- What is the cheapest AI coding subscription?
- How do GitHub Copilot AI credits work, and how much is a credit in dollars?
- Is T3 Code free? What does it actually cost?
- Is Cursor free?
- What are Cursor Live Apps and which plans get them?
- What is Cursor Voice Chat and how is it different from dictation?
- What is Antigravity Voice mode and how is it different from voice dictation?
- Is GitHub Copilot free?
- Is Codex free?
- Is Gemini CLI free?
- Is OpenCode free?
- Will ChatGPT and Codex share usage limits?
- What does OpenAI's Pierre acquisition mean for Codex?
- Meta acquired Conductor — what happens to cloud, local, and what should users do?
- Cursor Voice Chat vs Antigravity Voice mode: which should you use?
- What happens to Claude Code Opus 4.8 fast mode on November 30, 2026?
- Do Claude Code background subagents use less of your usage limit now?
- What is OpenRouter Auto Code, and what does it cost?
- Is Qoder free, and what is the free Qoduck model?
- Claude Code vs Codex computer use: which one can control your desktop, and on which plan?
- How do you use Claude Fable 5.2 in Claude Code, what does it cost, and which plans include it?
- Are there Black Friday 2026 deals on AI coding tools like Cursor, Claude Code, GitHub Copilot and Antigravity?
- Can you use Inkling 2 Mini as a free local model in Claude Code or OpenCode?
- AI Coding Cost Cheat Sheet (free PDF) what $0, $20 and $100+ a month gets you
- Affiliate disclosure
Spotted an error? Send a correction.
Free: the AI Coding Cost Cheat Sheet (PDF)
What $0, about $20 and $100+ a month gets you across 22 AI coding tools, with prices copied from vendor pages when we wrote it; plans change often, so check each vendor's page before you buy. Enter your email to download it now. You'll also get our free weekly email: what shipped and which picks or prices moved, about a 2-minute read. Unsubscribe anytime.