Claude Code API vs. Subscription (Pro & Max): Real Token Math for Developers
How prompt caching, 5-minute cache writes, and long agent loops change the break-even point between Anthropic API billing, Claude Pro ($20), and Claude Max ($100/$200).
Should you run Claude Code on pay-as-you-go Anthropic API billing, or on a flat-rate Claude Pro ($20/mo) or Claude Max ($100/mo or $200/mo) subscription? The answer depends almost entirely on one mechanic that most casual estimates ignore: agentic prompt caching.
Why agentic coding burns huge prompt token volumes
In an agentic terminal loop like Claude Code, every tool call (reading a file, running a test command, checking a diff, applying an edit) triggers another model turn. Each turn sends the full conversation history, system prompt, tool schemas, and file contents back to the model.
A single 20-minute bug fix can easily execute 25 to 40 turns at an average context length of 60,000 to 120,000 tokens. Anthropic's prompt cache keeps that affordable by pricing cache reads at a small fraction of base input tokens, while charging 1.25× base input for 5-minute cache writes.
Published Anthropic standard-tier API list prices
The table below mirrors the standard-tier USD per million token list rates retrieved20 November 2026 (the exact table used in RateLimitBar's optional local token estimator):
| Model | Input / 1M | 5m Cache Write / 1M | Cache Read / 1M | Output / 1M |
|---|---|---|---|---|
| Claude Sonnet 5.5 | $2.00 | $2.50 | $0.10 | $10.00 |
| Claude Sonnet 4.6 | $3.00 | $3.75 | $0.30 | $15.00 |
| Claude Opus 5.5 | $4.00 | $5.00 | $0.20 | $20.00 |
| Claude Opus 4.6 | $5.00 | $6.25 | $0.50 | $25.00 |
| Claude Fable 5.2 | $8.00 | $10.00 | $0.20 | $40.00 |
| Claude Haiku 5.5 | $0.10 | $0.125 | $0.01 | $0.50 |
Worked example: a realistic full-time Claude Code workday
Suppose you code actively with Claude Code for 4 hours/day, 5 days/week(~21.6 days/month) on Claude Sonnet 5.5, averaging 24 turns per hour (~2,075 turns/month), 65K average prompt tokens per turn, an 82% prompt cache hit rate, and 1,200 output tokens per turn:
- Cache reads: ~110.6M tokens × $0.10/M ≈ $11.06
- 5-minute cache writes: ~13.4M tokens × $2.50/M ≈ $33.50
- Fresh uncached input: ~10.9M tokens × $2.00/M ≈ $21.80
- Output tokens: ~2.5M tokens × $10.00/M ≈ $24.90
- Total at API list rates: roughly $91/month, and switching half those turns to Opus 5.5 doubles it past $180/month.
When a subscription wins vs. when direct API wins
Choose Claude Pro ($20) or Max ($100 / $200) when:
- You code interactively most weekdays and reuse long cached sessions across multi-file tasks.
- You want predictable monthly spend with zero surprise bills after a runaway loop.
- You can work around 5-hour and weekly ceilings (or monitor your pace so you switch models before hitting 0%).
Choose direct Anthropic API billing when:
- You use Claude Code only a few hours per month (estimated list spend under $20/mo).
- You run headless CI/CD pipelines, automated PR bots, or bursty batch jobs where a 5-hour lockout is unacceptable.
- Your organization requires Enterprise Zero Data Retention (ZDR), AWS Bedrock, or Google Vertex AI routing.
Run your own numbers
Adjust model choice, daily hours, context length, and cache hit rate in ourinteractive Claude & Codex Limit Calculator. And if you want to measure your actual local Claude Code JSONL token volume alongside live 5-hour and weekly quota meters, RateLimitBar includes opt-in local token reporting (deduplicating resumed sessions by message.id + requestId, and clearly labeling cost estimates At API rates).
See your limits in the macOS menu bar
RateLimitBar: $15 one-time
Native SwiftUI menu-bar monitor for Claude Code & OpenAI Codex. Official CLI sources only, zero credential reads, 7-day free trial.