You want to run Claude Code and you need to know which subscription to buy. The short answer: a paid plan is required. The free Claude.ai plan does not include Claude Code access at all.
Pro at $17/month billed annually ($20 monthly) is the entry point and includes Claude Code. Max 5x is $100/month for roughly 5x the per-session usage of Pro. Max 20x is $200/month for roughly 20x. This page picks the plan for your usage, lists what each tier includes, and explains the API-key route that skips the subscription.
Do I Need a Subscription for Claude Code?
You need a paid plan or an API key. There is no fully free path. Anthropic's setup docs are explicit: Claude Code requires a Pro, Max, Team, Enterprise, or Console account, and "the free Claude.ai plan does not include Claude Code access."
Four ways to authenticate:
- Claude subscription (Pro, Max, Team, Enterprise): flat monthly fee, usage metered by session, shared with Claude chat.
- Console API key: pay per token, no monthly floor, billed to your Anthropic Console balance.
- Cloud providers: Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, billed through that cloud account.
- LLM gateway: route through LiteLLM or a self-hosted proxy for load balancing, fallbacks, and cost tracking.
One-line answer
Every Subscription in One Table
All prices from Anthropic's pricing page as of June 9, 2026. Annual billing is cheaper per month; monthly billing is shown in parentheses where it differs.
| Plan | Price | Claude Code | Best For |
|---|---|---|---|
| Free | $0 | Not included | Claude chat only |
| Pro | $17/mo annual ($20 monthly) | Included | Solo, light-to-moderate coding |
| Max 5x | $100/mo | Included (5x Pro usage) | Daily coding, occasional limit hits |
| Max 20x | $200/mo | Included (20x Pro usage) | All-day agents, heavy Opus use |
| Team standard | $20/seat annual ($25 monthly) | Included | Small teams, central billing |
| Team premium | $100/seat annual ($125 monthly) | Included + Claude Cowork | Teams with heavy usage |
| Enterprise | Seat price + usage at API rates | Included | SSO, managed policy, compliance |
Free plan note
Which Plan Should I Buy?
Match your usage pattern to a tier. The decision turns on how often you hit Pro's session limits and whether you run Opus.
| Your Usage | Plan | Why |
|---|---|---|
| A few coding sessions a week | Pro ($17-20) | Lowest cost with Claude Code; limits rarely hit |
| Daily coding, hits Pro limits sometimes | Max 5x ($100) | 5x the per-session usage; $3.33/day |
| Agents running most of the day | Max 20x ($200) | 20x usage; $6.67/day; headroom for Opus |
| Light or bursty, hate monthly floors | API key (no subscription) | Pay per token; $0 on idle days |
| Team with shared billing | Team standard ($20-25/seat) | Per-seat budgets, central admin |
| Enterprise: SSO, policy, compliance | Enterprise | Managed settings, seat price + API-rate usage |
For exact per-token breakeven math (the day a Max plan beats pay-as-you-go), see the full Claude Code pricing breakdown. For multi-seat math, see Claude Code team pricing.
What Each Plan Includes
Every paid plan unlocks the same Claude Code feature set. The difference is usage headroom, not capability. What you get on any of them:
The full agent toolset
Terminal CLI, VS Code extension, JetBrains plugin, and a graphical Desktop app for macOS and Windows. Hooks, auto-memory, MCP servers, skills, plugins, and the Agent SDK are all available.
Shared usage with Claude chat
On Pro and Max, your usage is one pool across Claude chat and Claude Code. Heavy coding eats the same session budget as chat. Track it with /usage and /status.
Latest models
Plans route to the current Sonnet, Opus, and Haiku generations. Max plans give more room for Opus, which carries the highest per-token cost on the API side.
Team and Enterprise extras
Team premium adds Claude Cowork. Enterprise adds SSO, managed-settings policy (managed-settings.json can lock down permissions and block bypass mode), and usage billed at API rates.
How Usage Sessions Work
Subscriptions are not unlimited. Usage is metered against your plan's five-hour session limit, plus weekly caps. The Max plans carry two weekly limits: one across all models and a separate one for Sonnet models only.
Max 5x provides 5 times more usage per session than Pro; Max 20x provides 20 times more. Anthropic's current support docs no longer publish fixed hours-of-Sonnet or hours-of-Opus per week, so the multiplier is the reliable number to reason about. Check reset times for the Opus-only and all-models weekly limits in your account.
See your remaining usage
/usage or /status inside Claude Code, or open Settings then Usage on the web. Both show the same shared Pro/Max budget across chat and code.For the full breakdown of the 5-hour window and weekly caps, see Claude Code usage limits.
June 15, 2026: Agent SDK Credit Change
One change affects anyone running Claude Code non-interactively. Starting June 15, 2026, Agent SDK usage and claude -p (non-interactive) usage on subscription plans draws from a separate monthly Agent SDK credit, not your interactive session limits.
| Plan | Agent SDK Credit |
|---|---|
| Pro | $20 |
| Max 5x | $100 |
| Max 20x | $200 |
| Team standard seat | $20 |
| Team premium seat | $100 |
| Enterprise premium seat | $200 |
The credit covers Agent SDK projects, claude -p, the GitHub Actions integration, and third-party apps authenticating with your subscription. When the credit is exhausted, usage flows to usage credits at standard API rates if you have enabled them; otherwise requests stop. Unused credit does not roll over.
Who this affects
claude -p.Subscription vs API Key: Which Costs Less
A subscription is a flat monthly fee with session limits. An API key is pure pay-per-token with no monthly floor. The right choice is arithmetic.
| Model | Input | Output | Cache Read |
|---|---|---|---|
| Claude Opus 4.6 | $5 | $25 | $0.50 |
| Claude Sonnet 4.6 | $3 | $15 | $0.30 |
| Claude Haiku 4.5 | $1 | $5 | $0.10 |
Prompt caching matters here because Claude Code resends your context every turn. Cache reads bill at 0.1x base input price, so a long-lived session is far cheaper than the raw input rate suggests. Both Opus 4.6 and Sonnet 4.6 include the full 1M-token context window at standard pricing, with no surcharge tier above 200K tokens.
The breakeven is simple. Max 5x at $100/month is $3.33/day; Max 20x at $200/month is $6.67/day. If your metered API spend would exceed that on a typical day, the subscription wins. If you code in bursts with idle days, the API key wins because idle days cost $0.
Rule of thumb
Routing Claude Code to Cheaper or Open Models
Claude Code is not locked to Anthropic billing. It talks to any endpoint that exposes the Anthropic Messages API (/v1/messages, /v1/messages/count_tokens) and forwards the anthropic-beta and anthropic-version headers. That opens two cost levers: a gateway for routing and fallbacks, and open models served at a fraction of frontier prices.
Point Claude Code at an LLM gateway with two environment variables:
export ANTHROPIC_BASE_URL=https://litellm-server:4000
export ANTHROPIC_AUTH_TOKEN=sk-litellm-static-keyA gateway gives you load balancing, fallbacks, and per-session cost tracking. Claude Code sends X-Claude-Code-Session-Id and X-Claude-Code-Agent-Id headers so the gateway can attribute spend per session and per subagent.
LiteLLM security note
Running open models for codegen at Morph prices
Once Claude Code points at a gateway, you can swap the underlying model for a cheaper open one. For DeepSeek and code-specific work, where it runs matters as much as which model.
Morph serves DeepSeek with 16-bit (bf16) activations, no fp8 or int8 quantization. Most serverless providers quantize activations to fp8 to cut cost, which degrades output quality; keeping full 16-bit activations means responses match the reference weights. For codegen, Morph adds speculative decoding tuned on code (draft and ngram) plus custom low-level inference kernels, which makes it the fastest and highest-fidelity place to run open models for coding agents specifically.
| Model | Input / 1M | Output / 1M | Notes |
|---|---|---|---|
| morph-dsv4flash (DeepSeek V4 Flash) | $0.139 | $0.278 | 16-bit activations, code-tuned speculative decoding |
| Claude Opus 4.6 (reference) | $5 | $25 | Frontier model, Anthropic API |
See Morph Open Source Models and pricing for the full model list and rates. For agentic code search inside any tool, WarpGrep is free up to 100k requests and $1 per 1M requests on Pro.
Set Up Your Subscription
After you buy a plan, install Claude Code and sign in. The native installer is recommended on macOS, Linux, and WSL:
curl -fsSL https://claude.ai/install.sh | bashOn Windows PowerShell:
irm https://claude.ai/install.ps1 | iexNative installs auto-update in the background. Run claude to start, then sign in with your subscription account. Verify with claude --version and run claude doctor for a detailed config check. To force the subscription login over Console, set {"forceLoginMethod": "claudeai"} in settings. The npm, Homebrew, WinGet, and signed apt/dnf/apk routes are covered on the install guide.
Frequently Asked Questions
Do I need a subscription to use Claude Code?
You need a paid plan or an API key. Claude Code requires a Pro, Max, Team, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code access. You can also authenticate through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.
Does the $20 Pro plan include Claude Code?
Yes. Pro is $17/month billed annually or $20/month monthly, and the plan listing reads "Includes Claude Code." Pro shares one usage budget across Claude chat and Claude Code.
What is the difference between Max 5x and Max 20x?
Max 5x ($100/month) gives 5 times more usage per session than Pro. Max 20x ($200/month) gives 20 times more. Both have two weekly limits: one across all models and one for Sonnet only. Buy 5x if Pro limits run out occasionally; buy 20x if you run Claude Code most of the day or lean on Opus.
Can I use Claude Code without a subscription?
Yes, with a Console API key billed per token (Sonnet 4.6 $3/$15, Opus 4.6 $5/$25, Haiku 4.5 $1/$5 per million input/output tokens), or through Amazon Bedrock, Google Vertex AI, Microsoft Foundry, or an LLM gateway. The API key has no monthly floor.
Is Pro and Max usage shared between Claude chat and Claude Code?
Yes. On Pro and Max, usage is metered against the five-hour session limit and shared across chat and code. Track it with /usage and /status in Claude Code or Settings then Usage on the web.
Can I run Claude Code on cheaper open models?
Yes. Point Claude Code at a gateway with ANTHROPIC_BASE_URL and route to an open model. Morph serves DeepSeek with full 16-bit activations and code-tuned speculative decoding; morph-dsv4flash (DeepSeek V4 Flash) is $0.139 input and $0.278 output per 1M tokens. See Morph Open Source Models.
What changes for subscription users on June 15, 2026?
Non-interactive usage (Agent SDK, claude -p, GitHub Actions, third-party apps using your subscription) draws from a separate monthly Agent SDK credit: $20 on Pro, $100 on Max 5x, $200 on Max 20x. When it is exhausted, usage flows to API-rate credits if enabled, otherwise stops. Unused credit does not roll over.
Run Open Models for Codegen at Morph Prices
Morph serves DeepSeek and other open models with full 16-bit activations and code-tuned speculative decoding. morph-dsv4flash is $0.139 in / $0.278 out per 1M tokens. WarpGrep code search is free to 100k requests. Point Claude Code at a gateway and route to Morph.
