Claude Code is Anthropic's terminal-based coding agent. Unlike the regular Claude chat interface, it can read files, run commands, and execute multi-step tasks autonomously — which means it burns tokens fast. This guide breaks down every way to access Claude Code, how many tokens each plan gets you, and when paying for API access is cheaper than a Max subscription.
| Plan | Price | Claude Code budget | Good for |
|---|---|---|---|
| Free Claude | $0 | None — not included | Not an option for Claude Code |
| Claude Pro | $20 / mo | Small (30-50 min/day) | Light, occasional coding |
| Claude Max 5x | $100 / mo | ~5x Pro budget | Daily coding, single project |
| Claude Max 20x | $200 / mo | ~20x Pro budget | All-day coding, multiple projects |
| API (pay per token) | $3-$25 / 1M tokens | Unlimited | Apps integrating Claude Code style workflows |
No. Claude Code is not available on the free Claude tier at claude.ai. You need one of these to use it:
New API accounts get $5 in trial credits, which is enough to test Claude Code for 1-2 days of moderate use before you have to add a payment method.
Pro includes a small token budget specifically for Claude Code. Anthropic doesn't publish the exact number — and the limit is dynamic — but in practice you'll get 30-50 minutes of active coding per 5-hour window on Pro. That's enough to:
It's not enough for: shipping a feature, working through a long-context codebase, or running an autonomous task overnight.
Anthropic launched the Max plans specifically because Claude Code power users were maxing out Pro in hours. The two tiers:
Claude Code uses a rolling 5-hour window. Unlike daily-reset systems, your budget continuously regenerates: usage from 5 hours ago is released back into your available budget. There's no fixed reset time like midnight or 9am.
Practical implication: if you hit the limit at 2pm, you don't need to wait until tomorrow. By 7pm the same day you'll have full capacity again.
Claude Code can run directly against your Anthropic API key instead of through a subscription. Token pricing:
| Model | Input / 1M tokens | Output / 1M tokens |
|---|---|---|
| Claude Opus 4.7 (default for Claude Code) | $5.00 | $25.00 |
| Claude Sonnet 4.6 | $3.00 | $15.00 |
| Claude Haiku 4.5 | $1.00 | $5.00 |
An active 30-minute coding session typically uses around 50K input tokens (your codebase context + tool results) and 20K output tokens (edits, explanations, planning):
$0.25 + $0.50 = $0.75$0.15 + $0.30 = $0.45For a developer running 4-6 such sessions per day (typical for someone who uses Claude Code as their primary coding tool), the monthly bill on API works out to:
Anthropic's prompt caching feature drops input token cost to 10 percent of list price when you reuse a prefix within 5 minutes (or 1 hour with the extended TTL). Claude Code automatically caches your working-directory context, which is the biggest line item for most sessions. With caching, a typical Sonnet session drops from $0.45 to roughly $0.18.
Anthropic deliberately does not publish a hard token count — the actual budget is dynamic based on server load and recent user behavior. Community measurements suggest Pro delivers something like 200K-400K tokens of Claude Code usage per 5-hour window, with Max 5x at roughly 1-2M tokens and Max 20x at 4-8M tokens per window.
If you need precise per-prompt token measurements before sending requests, paste your prompt into the WeighMyPrompt counter — it uses Anthropic's tokenizer to give you exact counts.