Claude AI costs, the four ways you actually pay
Anthropic publishes three pricing surfaces on its site: Pro, Max, and the per-token API. There is a fourth that does not appear on the pricing page but matters a lot if you build apps with Claude. It is the OAuth scope that lets an external client spend tokens from your existing Pro or Max bucket instead of a metered API key. Below are the verified numbers, plus the line of code in mk0r that decides which surface bills the inference for a given chat turn.
How much does Claude AI cost in 2026?
- Free trial credits on a new Anthropic API account, enough for a few hundred Haiku calls.
- Claude Pro: $20 / month monthly, $17 / month annually ($200 up front).
- Claude Max: $100 / month (5x Pro) or $200 / month (20x Pro).
- Per-token API: $1 input / $5 output (Haiku 4.5), $3 / $15 (Sonnet 4.5, 4.6), $5 / $25 (Opus 4.5, 4.6, 4.7), all per million tokens.
- OAuth-stacked builders: consume the same inference from your Pro or Max bucket via the user:inference scope, no metered API charges.
Source: platform.claude.com/docs/en/about-claude/pricing and claude.com/pricing.
The three surfaces Anthropic publishes
Most Claude AI cost write-ups treat these as one big table. They are not. They are three separate billing systems that share a model catalog. Pro and Max are flat-rate consumer subscriptions that bill per month and meter against an opaque usage allowance. The API is metered per token and bills against a credit balance you top up. Free trial credits sit on the API surface and disappear when they run out.
Free trial credits
New API accounts receive a small pool of credits to try the platform. Anthropic does not publish the dollar value on the pricing page; treat it as enough for a few hundred Haiku calls, not a production runway.
Claude Pro
$20 per month if billed monthly, $17 per month on the annual plan ($200 paid up front). Includes Claude.com chat, projects, and an OAuth scope that lets external clients consume from this same bucket.
Claude Max (5x)
$100 per month. Five times the Pro usage allowance. Same models, same OAuth scope, higher rate limits before throttling.
Claude Max (20x)
$200 per month. Twenty times the Pro allowance. The plan that makes a Claude Code workflow effectively flat-rate for one heavy user.
Per-token API
$1 to $5 per million input tokens, $5 to $25 per million output tokens, depending on the model. Cache writes are 1.25x base (5 min) or 2x base (1 hour). Cache reads are 0.1x base. Batch API is 50% off both directions.
Session runtime add-on
Claude Managed Agents adds $0.08 per session-hour on top of token cost. Only counts while status is 'running'. Idle and rescheduling time is free.
Per-token API rates (verified April 29, 2026)
Every model that is currently for sale, by base input rate and output rate per million tokens. Cache writes and reads use multipliers on top of the base input rate. Batch API takes 50% off both directions for asynchronous workloads.
| Feature | Output / MTok | Input / MTok |
|---|---|---|
| Claude Opus 4.7 | $5.00 / MTok | $25.00 / MTok |
| Claude Opus 4.6 | $5.00 / MTok | $25.00 / MTok |
| Claude Opus 4.5 | $5.00 / MTok | $25.00 / MTok |
| Claude Opus 4.1 | $15.00 / MTok | $75.00 / MTok |
| Claude Opus 4 | $15.00 / MTok | $75.00 / MTok |
| Claude Sonnet 4.6 | $3.00 / MTok | $15.00 / MTok |
| Claude Sonnet 4.5 | $3.00 / MTok | $15.00 / MTok |
| Claude Sonnet 4 | $3.00 / MTok | $15.00 / MTok |
| Claude Haiku 4.5 | $1.00 / MTok | $5.00 / MTok |
| Claude Haiku 3.5 | $0.80 / MTok | $4.00 / MTok |
Cache write multipliers: 1.25x base for the 5-minute cache, 2x base for the 1-hour cache. Cache read: 0.1x base. Source: platform.claude.com pricing docs.
The fourth path the pricing page does not mention
When Anthropic shipped Claude Code, it added an OAuth scope on the consumer side called user:inference. That scope lets an external client (the CLI, or any builder that implements the same PKCE handshake) spend tokens against your existing Pro or Max plan. The published pricing page does not walk through this. It is documented inside the CLI binary and inferable from the request headers Claude.com requires (anthropic-beta: oauth-2025-04-20) on inference made with an OAuth token instead of a key.
mk0r implements the same PKCE flow. The relevant constants live in src/lib/claude-oauth.ts: client_id 9d1c250a-e61b-44d9-88ed-5944d1962f5e, authorize URL https://claude.com/cai/oauth/authorize, token URL https://platform.claude.com/v1/oauth/token. Once the handshake completes, the access and refresh tokens land in Firestore (encrypted with AES-256-GCM) and every chat turn chooses between this OAuth blob and the shared API key.
The decision happens on a single line. Below is the actual branch, side by side for the two cases.
The line that decides which Claude surface bills your tokens
// src/app/api/chat/route.ts
// Anonymous visitor: no Firebase user, no Claude OAuth tokens.
const sharedApiKey = process.env.ANTHROPIC_API_KEY;
let oauthToken: string | undefined;
if (!authedUser.isAnonymous) {
// anonymous, so this branch is skipped
}
// apiKey ends up = ANTHROPIC_API_KEY.
// Every input and output token is metered against
// mk0r's own Anthropic bill at the published API rates.
const apiKey = oauthToken ? "" : sharedApiKey ?? "";“Per-token cost to the user when oauthToken is set in src/app/api/chat/route.ts. The apiKey on the inference call is literally the empty string and the ACP subprocess spawns with the user's OAuth credentials instead. The Pro plan they already pay $20 a month for absorbs the tokens.”
src/app/api/chat/route.ts:187
mk0r free vs mk0r Pro vs bring-your-own Claude
The product itself has three cost paths a user can land on. They are independent of the Anthropic surfaces above and they stack: an mk0r Pro user can also connect their Claude plan via OAuth, in which case the model usage runs through their subscription and they only pay the $19 product fee. Below is the difference between the two non-anonymous paths.
| Feature | mk0r Pro + connected Claude plan | mk0r free (anonymous) |
|---|---|---|
| Headline price | $0 | $20 / month (or $17 on annual) |
| Models you can pick | Claude Haiku only | Sonnet, Opus, Haiku |
| Where the inference is billed | mk0r's shared ANTHROPIC_API_KEY | Your Claude.com Pro plan, via OAuth |
| Per-token charges to you | None | None (your subscription absorbs the tokens) |
| Model picker label in the UI | haiku → 'Scary' | default → 'Fast', sonnet[1m] → 'Fast+', opus[1m] → 'Smart' |
| Sign-in required | No | Google sign-in plus Claude OAuth handshake |
The free path is metered against mk0r's own Anthropic key (we pay the per-token cost). The Pro + OAuth path is metered against your Anthropic plan. mk0r Pro on its own (no OAuth) routes through mk0r's key and unlocks Sonnet and Opus inside the picker; we eat that cost in exchange for the $19/mo product fee and the trial conversion.
Worked example: a 50-prompt build session on Sonnet 4.6
Assume an average chat turn that sends 12,000 input tokens (system prompt + history + user message) and emits 2,500 output tokens. Assume a 1-hour cache hit on the system prompt and history of 9,000 tokens after the first turn. Run 50 turns.
- Per-token API math: first turn writes 9,000 tokens to cache at 2x base ($0.054), reads 0 cache, fresh input 3,000 ($0.009), output 2,500 ($0.0375). Turns 2 through 50 read 9,000 cached tokens at 0.1x base ($0.0027 each), fresh input 3,000 ($0.009 each), output 2,500 ($0.0375 each). Total ≈ $2.51.
- OAuth path on Pro ($20 / month): the 50 turns consume from your Pro usage allowance. At a typical Pro user cadence of 5 such sessions per day for 20 working days, you are inside the allowance. Marginal cost of the build session: $0.
- OAuth path on Max 20x ($200 / month): same marginal cost as Pro for the build session itself, but the allowance absorbs roughly 20x more before you hit the rate limit. Marginal cost: $0.
The threshold where Pro stops winning against the API is the point at which the rate limit on the consumer plan becomes the constraint, not the dollar cost. For a single human running a builder, that threshold is high: you would have to keep a heavily-prompted Sonnet session pinned for hours per day to outrun the Pro allowance. Most app build workflows do not.
Hidden costs the headline rates do not capture
- Web search: $10 per 1,000 searches on the API, on top of token costs for the search-generated content that gets folded into your context.
- Code execution: free if you bundle web_search or web_fetch in the same request. Otherwise $0.05 per container-hour, with the first 1,550 hours per month free per organization.
- Tool use overhead: tool definitions add 245 to 700 input tokens per request depending on the tool. The text editor tool adds 700 tokens. The bash tool adds 245. These count against your input bill on every turn that includes a tool.
- Data residency: US-only inference on Opus 4.6, 4.7, and newer adds a 1.1x multiplier on every token-pricing line. Cache writes, cache reads, and outputs all get the same 10% bump.
- Long context: Sonnet 4.6, Opus 4.6, and Opus 4.7 include the full 1M-token window at standard rates. A 900,000-token request bills at the same per-token rate as a 9,000-token request. Earlier 4.x models did not.
- Fast mode: Opus 4.6 in research-preview Fast mode is $30 input and $150 output per million tokens (6x standard). Stacks with prompt caching multipliers and data residency. Not available in Batch.
Want to talk through which path fits your build pattern?
15 minutes on Cal. We will look at your typical session shape, estimate cost on each surface, and tell you whether OAuth + Pro is the right move for you.
Frequently asked questions
What does Claude AI cost in 2026, in one sentence?
Three published surfaces and one stacking trick. Free trial credits on a new API account, $17 to $20 per month for Pro, $100 or $200 per month for Max, and a per-token API from $1 input ($5 output) on Haiku 4.5 to $5 input ($25 output) on Opus 4.7 per million tokens. The trick is that the Pro and Max plans expose an OAuth scope (user:inference) that external builders can consume from, so a chat turn that would otherwise be metered against an API key can be billed against your flat monthly subscription instead.
Where do the published API rates live, and how do I verify them myself?
The official table is at https://platform.claude.com/docs/en/about-claude/pricing. Verified on April 29, 2026: Opus 4.7, 4.6, and 4.5 are $5 input and $25 output per million tokens; Opus 4.1 and 4 are $15 / $75; Sonnet 4.6, 4.5, and 4 are $3 / $15; Haiku 4.5 is $1 / $5; Haiku 3.5 is $0.80 / $4. Cache writes are 1.25x base for 5-minute cache or 2x base for 1-hour cache. Cache reads are 0.1x base. Batch API is a 50% discount on input and output. The Pro and Max plans live at https://claude.com/pricing.
How does the OAuth path actually save me money against the API path?
It does not save you money in absolute terms. It moves you from a metered-per-token cost model to a flat monthly cost model. If you spend a heavy day prompting Sonnet through a builder, the metered API would charge you proportional to the tokens. The OAuth path consumes from the Pro or Max usage allowance you already pay $20 or $200 a month for. For users who already pay Anthropic, that means an app build session adds zero new line items. The constraint is the rate-limit window on the plan, not a credit balance.
What is the actual line of code that picks between the two paths in mk0r?
src/app/api/chat/route.ts line 187 reads `const apiKey = oauthToken ? "" : sharedApiKey ?? "";`. If the user has a connected Claude OAuth session, oauthToken is the JSON blob for the user's credentials and apiKey is set to the empty string. The ACP subprocess that drives Claude inside the E2B sandbox is spawned with that empty string in ANTHROPIC_API_KEY and the OAuth blob in CLAUDE_CODE_OAUTH_TOKEN, plus the anthropic-beta: oauth-2025-04-20 header. Inference for that turn is billed against the user's plan, not against mk0r's API key.
What does mk0r itself cost?
Anonymous use is free. The default model on a fresh session is pinned to Haiku at src/app/api/chat/model/route.ts line 5 (FREE_MODEL = 'haiku'); inference goes through mk0r's shared ANTHROPIC_API_KEY and you pay $0. The mk0r Pro tier is $19 per month with a 21-day free trial (src/app/checkout/page.tsx, captured as 'price: 19, trial_days: 21' in the PostHog checkout_started event). That tier unlocks Sonnet and Opus inside the model picker. Separately, you can connect your own Claude.com Pro or Max plan via OAuth, and mk0r will route inference through your subscription instead. The two settings stack: an mk0r Pro user with a connected Claude plan pays $19 to mk0r and consumes Claude tokens from their existing Anthropic plan.
What are the model picker labels in mk0r and what do they map to?
src/components/header.tsx defines MODEL_LABELS as: default → 'Fast', haiku → 'Scary', sonnet[1m] → 'Fast+', opus[1m] → 'Smart'. The 'haiku' label is intentionally dramatic because it is the only model an anonymous or free-tier user can run, and the landing copy advertises sub-30-second builds against it. The 1m suffix on Sonnet and Opus selects the 1M-token long-context variant. Long context is included at the standard per-token rate on Claude Sonnet 4.6, Opus 4.6, and Opus 4.7, so the 'Smart' label does not carry a context premium.
How does prompt caching change the math for an app builder?
It changes it a lot. Cache writes cost 1.25x base for the 5-minute cache or 2x base for the 1-hour cache. Cache reads cost 0.1x base. For a builder that re-sends a large system prompt and a long conversation history on every chat turn, the reusable bytes hit the cache-read rate after the first write. On Sonnet 4.6 that is $0.30 per million input tokens for cached content versus $3.00 for fresh input, a 10x reduction. The Anthropic worked example in their pricing doc shows a one-hour Opus 4.7 session dropping from $0.705 to $0.525 when 40,000 of 50,000 input tokens are cache reads.
What about the Batch API and Fast mode?
Batch is a 50% discount on input and output for asynchronous workloads. It is not relevant to a real-time builder because the builder needs the response to stream back into the iframe immediately. Fast mode is the opposite trade: 6x standard rates on Opus 4.6 ($30 input, $150 output per million) for higher throughput, currently in beta. Builders that target a chat-driven preview loop (mk0r included) do not enable either, because batch breaks streaming and Fast mode burns cost faster than the user gains by waiting one fewer second.
Are there hidden fees on the API that the model price does not capture?
A few. Web search is $10 per 1,000 searches on top of token costs. Code execution is free if you bundle web_search or web_fetch in the same request, otherwise $0.05 per container hour after a free monthly allowance of 1,550 hours. Tool use adds 245 to 700 tokens per tool definition. Computer use adds 466 to 499 tokens to the system prompt and 735 tokens per tool definition on Claude 4.x. Data residency on US-only inference adds a 1.1x multiplier on Opus 4.6, 4.7, and newer. None of these apply to the OAuth path because they bill against the API account directly, not the consumer plan.
Why does the 'no key, no signup' option exist at all?
Because the friction of putting a credit card on Anthropic, generating an API key, and remembering to rotate it kills the maker loop on a Saturday afternoon. The shared key is not free for mk0r, it is metered against our Anthropic bill at the rates above. We absorb that cost on Haiku because the unit economics work out on the conversion rate to mk0r Pro and to the connected-Claude-plan path. Sonnet and Opus on the shared key would not, which is why anonymous and free-tier accounts are pinned to Haiku in src/app/api/chat/model/route.ts.