← All articles

Claude Code API Pricing: Token Rates & Cost Estimates (2026)

Claude Code API pricing: Fable 5.2 $8/$40, Fable 5.1 $10/$50, Opus 5.5 $4/$20 and Sonnet 5.5 $2/$10 per 1M tokens. Compare rates and estimate costs.

UniRoute ·

1. Official Claude API Model Pricing Table

Claude Fable 5.2 is now listed at $8 input and $40 output per MTok. Its row was verified against Anthropic's pricing documentation on 2026-11-10; Fable 5.1 retains its own $10/$50 rates.

When you run Claude Code with an API key, usage is billed per token—all official Anthropic rates below are quoted in USD per 1,000,000 tokens (MTok) with the remaining rows verified against Anthropic's official pricing documentation on 2026-10-27. Because Claude Code sends system prompts, tool definitions, and project context across multiple turns, check Cache Hit & Refresh rates alongside Base Input and Output (5m cache writes cost 1.25× base input; 1h cache writes cost 2× base input):

ModelBase Input / MTok5m Cache Writes / MTok1h Cache Writes / MTokCache Hits & Refreshes / MTokOutputTokens / MTok
Claude Fable 5.2$8$10$16$0.20$40
Claude Fable 5.1$10$12.50$20$0.25$50
Claude Mythos 5.1 (limited availability)$10$12.50$20$0.25$50
Claude Fable 5$10$12.50$20$1$50
Claude Mythos 5 (limited availability)$10$12.50$20$1$50
Claude Opus 5.5$4$5$8$0.20$20
Claude Opus 5$5$6.25$10$0.50$25
Claude Opus 4.8 / 4.7 / 4.6 / 4.5$5$6.25$10$0.50$25
Claude Sonnet 5.5$2$2.50$4$0.10$10
Claude Sonnet 5$2$2.50$4$0.20$10
Claude Sonnet 4.6 / 4.5$3$3.75$6$0.30$15
Claude Haiku 5.5 (≤ 100K prompt tokens)$0.10$0.125$0.20$0.01$0.50
Claude Haiku 5.5 (> 100K prompt tokens)$0.50$0.625$1$0.05$2.50
Claude Haiku 4.5$1$1.25$2$0.10$5

Note on Claude Haiku 5.5 prompt length tiers: On Claude Haiku 5.5, if the total input prompt (including cache reads and cache writes) exceeds 100,000 tokens, all input and output tokens for that request are billed at the > 100K tier ($0.50 input / $0.05 cache hit / $2.50 output per MTok). On the official Batch API, asynchronous jobs receive a 50% discount on input and output tokens.


2. UniRoute vs. Official Anthropic Price Comparison

USD per 1M tokens; official checked: 2026-11-10. UniRoute retail: live gateway snapshot. Saving = 1 − retail / official, rounded to a whole percent; + means more expensive, 0% means equal at displayed precision.Standard and Discounted describe price bands, not upstream providers. Where routes share a band, one complete lowest default public rate set is shown; your key may use another route or account rate. A snapshot is not a frozen billing contract. Comparison covers ordinary standard context, excluding long-context surcharges and priority processing.
ModelOfficial inputOfficial outputUniRoute inputUniRoute outputYou save (input / output)
claude-fable-5 · Discounted price band · Standard$10.00$50.00$4.20$21.0058% / 58%
claude-fable-5 · Standard price band · Standard$10.00$50.00$10.00$50.000% / 0%
claude-fable-5-1 · Discounted price band · Standard$10.00$50.00$4.20$21.0058% / 58%
claude-fable-5-1 · Standard price band · Standard$10.00$50.00$10.00$50.000% / 0%
claude-fable-5-2 · Discounted price band · Standard$8.00$40.00$3.36$16.8058% / 58%
claude-fable-5-2 · Standard price band · Standard$8.00$40.00$8.00$40.000% / 0%
claude-haiku-4-5-20251001 · Discounted price band · Standard$1.00$5.00$0.42$2.1058% / 58%
claude-haiku-4-5-20251001 · Standard price band · Standard$1.00$5.00$1.00$5.000% / 0%
claude-opus-4-6 · Discounted price band · Standard$5.00$25.00$2.10$10.5058% / 58%
claude-opus-4-6 · Standard price band · Standard$5.00$25.00$5.00$25.000% / 0%
claude-opus-4-7 · Discounted price band · Standard$5.00$25.00$2.10$10.5058% / 58%
claude-opus-4-7 · Standard price band · Standard$5.00$25.00$5.00$25.000% / 0%
claude-opus-4-8 · Discounted price band · Standard$5.00$25.00$2.10$10.5058% / 58%
claude-opus-4-8 · Standard price band · Standard$5.00$25.00$5.00$25.000% / 0%
claude-opus-5 · Discounted price band · Standard$5.00$25.00$2.10$10.5058% / 58%
claude-opus-5 · Standard price band · Standard$5.00$25.00$5.00$25.000% / 0%
claude-opus-5-5 · Discounted price band · Standard$4.00$20.00$1.68$8.4058% / 58%
claude-opus-5-5 · Standard price band · Standard$4.00$20.00$4.00$20.000% / 0%
claude-sonnet-4-6 · Discounted price band · Standard$3.00$15.00$1.26$6.3058% / 58%
claude-sonnet-4-6 · Standard price band · Standard$3.00$15.00$3.00$15.000% / 0%
claude-sonnet-5 · Discounted price band · Standard$2.00$10.00$0.84$4.2058% / 58%
claude-sonnet-5 · Standard price band · Standard$2.00$10.00$2.00$10.000% / 0%
claude-sonnet-5-5 · Discounted price band · Standard$2.00$10.00$0.84$4.2058% / 58%
claude-sonnet-5-5 · Standard price band · Standard$2.00$10.00$2.00$10.000% / 0%

When you connect Claude Code to UniRoute with a UniRoute API key, you can choose between two channel tiers per key (see Channel Management for tier binding and automatic failover rules):

  • Discounted Tier (Discounted): Multi-provider aggregated channel where Claude models are available as low as 42% of the official list price (as of 2026-10-27; refer to the live comparison table above for current real-time rates). Ideal for high-frequency Claude Code sessions, repository indexing, and iterative debugging.
  • Standard Tier (Standard): Priced at the official baseline rate; choose it if you would rather not be exposed to discounted-channel fluctuations (see Channel Management).
  • Per-key routing & automatic failover: Switch channel tiers per API key or enable automatic failover so pre-stream upstream capacity errors (529) automatically retry across available channels.

3. Claude Code Session & Monthly Cost Calculator

Use the calculator below to estimate the cost of a single coding task or your monthly Claude Code spend across official Anthropic rates and UniRoute channels:

Token cost calculator

Official

Per request: $0.045

Per 30 days: $1,350.00

UniRoute

Per request: $0.0189

Per 30 days: $567.00

Saving per 30 days (official − UniRoute): $783.00 (58% saving)

The discounted channel can be unavailable; requests then fall back automatically to the standard band at official-level prices. Channel management

USD estimates, not a bill. Excludes cache discounts, long-context surcharges, reasoning-token variance and taxes. A negative saving means UniRoute costs more.

Standard and Discounted describe price bands, not upstream providers. Where routes share a band, one complete lowest default public rate set is shown; your key may use another route or account rate. A snapshot is not a frozen billing contract. Comparison covers ordinary standard context, excluding long-context surcharges and priority processing.


If you use Fable 5.2 for coding, the Claude Fable 5.2 API pricing and monthly calculator compares official cache rates with current UniRoute quotes.

4. API billing or a subscription

Claude Code API costs depend on the model, the context sent to it, generated output, and prompt caching. A coding task can make several requests, so its cost is not determined by the length of your final answer alone.

When you connect Claude Code to UniRoute with a UniRoute API key, check the selected model's UniRoute rate and reconcile usage with your UniRoute account charge. An Anthropic subscription and a UniRoute balance are separate purchases; topping up one does not add funds to the other.

QuestionClaude subscriptionClaude Code through UniRoute API
Which account pays?Your Anthropic account under its plan rulesYour UniRoute account balance
What should you compare?Plan price, included access, and usage limitsModel rates, request usage, and actual charges
Are balances shared?NoNo
What is a useful first check?Check the current plan and authentication rulesCheck model availability and start with a small request

Use the option that fits your workload. A subscription price alone does not establish whether API access will be cheaper for your project. Gateway authentication and current client behavior are described in the Claude Code gateway documentation.


5. Detailed Public Route Snapshot (ClaudeRuntimePrices)

Compare normal input, output, cache writes, and cache reads separately. Each rate applies to its own usage category; a single “input price” does not describe every billable token.

The table below shows default UniRoute public-route rates in USD per million tokens, without personal account discounts. Its retrieval time and rate snapshot identify the displayed rates. Your key’s permissions and route settings determine which route you can use. Compare the separate Anthropic official reference table, checked against the latest official pricing documentation, and use the matching UniRoute rate when estimating a UniRoute charge. A provider's published list price is a reference, not a promise that this is the amount UniRoute will charge.

Default public-route rates · USD per 1,000,000 tokens. “Standard” and “discounted” describe price bands, not the upstream provider. Where several routes share a band, this table shows one complete lowest-price rate set; your key may use another route. Rates cover ordinary processing in the standard context tier, excluding long-context surcharges and priority processing.

Current default retail rates from the UniRoute gateway
Model IDPrice bandInputOutputCache readCache write (5 min)Cache write (1 hour)Standard context limit
claude-fable-5Discounted$4.2$21$0.42$5.25$8.41,000,000 tokens
claude-fable-5Standard$10$50$1$12.5$201,000,000 tokens
claude-fable-5-1Discounted$4.2$21$0.105$5.25$8.41,000,000 tokens
claude-fable-5-1Standard$10$50$0.25$12.5$201,000,000 tokens
claude-fable-5-2Discounted$3.36$16.8$0.084$4.2$6.721,000,000 tokens
claude-fable-5-2Standard$8$40$0.2$10$161,000,000 tokens
claude-haiku-4-5-20251001Discounted$0.42$2.1$0.042$0.525$0.84200,000 tokens
claude-haiku-4-5-20251001Standard$1$5$0.1$1.25$2200,000 tokens
claude-opus-4-6Discounted$2.1$10.5$0.21$2.625$4.21,000,000 tokens
claude-opus-4-6Standard$5$25$0.5$6.25$101,000,000 tokens
claude-opus-4-7Discounted$2.1$10.5$0.21$2.625$4.21,000,000 tokens
claude-opus-4-7Standard$5$25$0.5$6.25$101,000,000 tokens
claude-opus-4-8Discounted$2.1$10.5$0.21$2.625$4.21,000,000 tokens
claude-opus-4-8Standard$5$25$0.5$6.25$101,000,000 tokens
claude-opus-5Discounted$2.1$10.5$0.21$2.625$4.21,000,000 tokens
claude-opus-5Standard$5$25$0.5$6.25$101,000,000 tokens
claude-opus-5-5Discounted$1.68$8.4$0.084$2.1$3.361,000,000 tokens
claude-opus-5-5Standard$4$20$0.2$5$81,000,000 tokens
claude-sonnet-4-6Discounted$1.26$6.3$0.126$1.575$2.521,000,000 tokens
claude-sonnet-4-6Standard$3$15$0.3$3.75$61,000,000 tokens
claude-sonnet-5Discounted$0.84$4.2$0.084$1.05$1.681,000,000 tokens
claude-sonnet-5Standard$2$10$0.2$2.5$41,000,000 tokens
claude-sonnet-5-5Discounted$0.84$4.2$0.084$1.05$1.051,000,000 tokens
claude-sonnet-5-5Standard$2$10$0.2$2.5$2.51,000,000 tokens

Retrieved at . Rate snapshot: sha256:bb4cb1113c6209a63bd5cebb04c27985738ac5c45329942223f3597ed9c01ff2. A snapshot identifies the displayed rate set; it is not a frozen billing contract for a future request. Missing cache rates are not free tokens. Confirm the applicable route and billing record before budgeting.

Estimate a request's cost

Estimate standard-context token cost for one selected model and price band from the table above (USD per 1M tokens). Ordinary uncached input excludes cache read and cache write tokens; if your raw log includes cached tokens in total input, subtract cached tokens first to avoid double counting.

$3 / 1M

Excludes cache read and cache write tokens. If your raw log includes cached tokens in total input, subtract cached tokens first to avoid double counting.

$15 / 1M

Includes visible response and thinking tokens billed as output; not counted toward prompt context limit.

$0.3 / 1M

Tokens read from an existing prompt cache prefix (cache_read_input_tokens).

$3.75 / 1M

Tokens written to a 5-minute TTL prompt cache (ephemeral_5m_input_tokens).

$6 / 1M

Tokens written to a 1-hour TTL prompt cache (ephemeral_1h_input_tokens).

Estimated cost (based on default public retail rates above, not an account bill)
Selected model & band: claude-sonnet-4-6 (Standard) · Prompt context (input + cache): 0 tokens · Standard context limit: 1,000,000 tokens
$0.00 USD
Token bucketTokensRoute rate (/ 1M)Bucket estimate (USD)
Ordinary uncached input tokens0$3$0.00
Output tokens0$15$0.00
Cache read tokens0$0.3$0.00
5m cache write tokens0$3.75$0.00
1h cache write tokens0$6$0.00

Anthropic official reference rates

Official first-party global API rates were checked on against Anthropic’s pricing documentation. These reference rates exclude priority processing, fast mode, batch discounts and residency premiums. They are separate from the UniRoute retail rates above; a configured channel rate may differ. Only models present in the current UniRoute public price table appear below.

Anthropic reference · USD per 1,000,000 tokens
Model IDPrompt tierInputOutputCache readCache write (5 min)Cache write (1 hour)
claude-fable-5-2Standard$8$40$0.2$10$16
claude-sonnet-5-5Standard$2$10$0.1$2.5$4
claude-opus-5-5Standard$4$20$0.2$5$8
claude-fable-5-1Standard$10$50$0.25$12.5$20
claude-fable-5Standard$10$50$1$12.5$20
claude-opus-5Standard$5$25$0.5$6.25$10
claude-opus-4-8Standard$5$25$0.5$6.25$10
claude-opus-4-7Standard$5$25$0.5$6.25$10
claude-opus-4-6Standard$5$25$0.5$6.25$10
claude-sonnet-5Standard$2$10$0.2$2.5$4
claude-sonnet-4-6Standard$3$15$0.3$3.75$6
claude-haiku-4-5-20251001Standard$1$5$0.1$1.25$2

For Haiku 5.5, prompt length includes ordinary input, cache writes and cache reads. Requests above 100,000 prompt tokens use the higher rate for all token categories in that request. An official model listing alone does not establish that your UniRoute key can use that model.

View prices and recharge options before creating a budget. Use a model that is currently available to your key and compatible with the Anthropic Messages protocol.


6. Estimate a request without counting tokens twice

Use the cost estimator above to test token counts against one selected model and price band from the UniRoute table. For a token-priced request, multiply each usage category by its matching rate from that same row, after dividing the token count by one million. Then add any separately documented billing items. The table covers standard token rates; long-context tiers, priority processing, or other separately priced features need their own applicable rates. Do not apply the standard table to those requests.

  • Ordinary input uses the ordinary-input rate.
  • Output uses the output rate.
  • Cache creation uses the applicable cache-write rate and cache lifetime; separate five-minute and one-hour writes when the record distinguishes them.
  • Cache reads use the cache-read rate.

Check how the billing record defines input. Ordinary uncached input excludes cache-read and cache-write tokens; if a raw log reports total input inclusive of cached tokens, subtract cached tokens before applying ordinary-input pricing so you do not count them twice. If a route row marks a cache rate as Not published, treat any non-zero usage in that bucket as unknown rather than $0. Apply the rate and accounting rules recorded for that request, rather than recalculating an old request at today's rate.

A task may read project files, use tools, continue through several turns, or start a new context. Record these requests as a task total when estimating a coding workflow. A one-request sample is not a fixed price for completing a programming task.


7. A reconciled historical request

On October 8, 2026, Claude Code version 2.1.293 made a short production request through UniRoute using claude-haiku-4-5-20251001. The recorded usage and account ledger were reconciled as follows:

ItemRecorded value
Ordinary input tokens535
Output tokens90
Cache-write tokens10,251
Cache-read tokens0
Actual UniRoute charge$0.00579548 USD

This historical example included cache creation. It is not a current quote, a general per-request price, or a budget for a complete coding project. The charged amount uses the account ledger's precision.


8. Reconcile your own bill

After a small request, open UniRoute Console and compare the request time, model, recorded usage, and actual charge. With several calls running at once, a balance change can include unrelated requests. Use the matching records rather than attributing the whole change to the last task you started.

Claude Code can show an estimated session cost (such as via /usage), which defaults to first-party reference rates and can differ from your UniRoute charge. Administrators can configure modelPricing through managed settings in Claude Code v2.1.242+ (and markup in v2.1.271+) to adjust the local estimate; keys in user, project, or local settings are ignored, and the setting does not alter what your provider charges. Use your UniRoute usage record and account ledger to confirm the actual charge, and see Claude Code cost management for the client's usage and estimate behavior.

A disconnected stream does not prove that a request consumed no tokens. Check the record before retrying, and retain a redacted error and request time if you need help. For server errors, follow the Claude Code API error 500 troubleshooting guide to distinguish failures, limit retries, and reconcile consumption; for mid-response cutoffs such as stream idle timeout - partial response received, use the Claude stream idle timeout diagnostic guide. Do not share your API key or project contents.


9. Keep a useful spending baseline

Start with a narrow task, then compare repeated tasks with similar model settings and context. Record task scope, model, token categories, number of requests, and actual cost. This gives you a workload-specific budget instead of relying on a generic monthly estimate.

To set up your connection, follow the Claude Code setup tutorial. You can create an API key or manage keys in the API Keys Console, then check your balance and recharge before making a paid request. Creating a key or reading the guide does not itself establish usable funds.

For an OpenRouter setup and a reversible provider trial, read Claude Code with OpenRouter: setup, costs, and switching providers. If you also run Codex or GPT models, see the OpenAI API price guide for GPT token costs on UniRoute. Check each service's own rates and usage records before comparing task costs.