321AI Model MarketplaceLive marketplace →

Claude API cost guide: the per-1M-token math

Model pricing · 2026-11-12 · 321AI engineering notes · get a key

Quick answer: Claude API pricing is token-based: input and output are billed separately per 1M tokens, cache reads cost less than fresh input, and the total for any workload is a two-line formula. This guide walks the math across the Opus, Sonnet and Haiku tiers using live market floor prices — not stale screenshots.

Sign up & get trial creditSee live pricing

The billing formula

Every Claude bill reduces to one line, evaluated per request and summed over your month:

cost = (input_tokens x input_price + output_tokens x output_price) / 1,000,000
      + cache_read_tokens x cache_read_price / 1,000,000

Prices are USD per 1M tokens. Cache reads — the repeated parts of your prompt the model has already seen — bill at a lower rate than fresh input, which is why structuring prompts cache-first is the cheapest optimization in this whole guide. Platform fee is 0 and failed calls are never billed, so the formula is the whole bill.

Billing semantics at a glance

ItemBilled atNotes
Input tokensInput rate / 1MPrompt and context sent with each call
Output tokensOutput rate / 1MAnswer plus reasoning tokens; usually the bigger line
Cache readsBelow input rateStable prefix re-read; structure prompts cache-first
Failed calls$0Pre-deduction refunds automatically

One subtlety worth naming: the price you are billed is the price of the lane that served the call, settled to actual usage. Because routing prefers the cheapest healthy lane by default, most traffic lands at or near the floor — but the authoritative number for any call is in your usage logs, itemized per request.

Current market floor prices (live)

On 321AI each Claude tier is quoted by multiple independent suppliers; the table below shows the market floor and how many lanes are bidding, rendered live at page build:

ModelMarket floor priceChannels
claude-opus-5-5$0.066987 in · $0.334935 out / 1M tok590
claude-sonnet-5$0.033492 in · $0.16746 out / 1M tok501
claude-haiku-5-5$0.0015 in · $0.0075 out / 1M tok228

Market floor across competing suppliers, rendered live at page build (data date 2026-11-20); per-supplier quotes on the marketplace. Machine-readable: GET https://321ai.cc/api/public/model-prices.

Per-supplier quotes with upstream self-check records are on the Claude API page; the full catalog is at /en/models/.

Worked examples

Three shapes of real usage, computed from the live floor at page build. Replicate with your own volumes — the formula does not change:

WorkloadModel (live floor)VolumeEstimated cost
Heavy coding day (Claude Code)claude-sonnet-510M in / 1M out$0.5024
Deep review task (Opus tier)claude-opus-5-52M in / 0.2M out$0.2010
Light assistant traffic (Haiku tier)claude-haiku-5-51M in / 0.25M out$0.0034

Computed at page build from live market floor prices (data date 2026-11-20): cost = input tokens × input price + output tokens × output price. Platform fee is 0 and failures are never billed, so this is the whole bill. Volumes are illustrative — re-run with your own from the usage logs.

Where the money actually goes

A weekly budget ritual that catches drift

Claude costs drift quietly — a new tool in the loop, a longer system prompt, an agent that answers with more prose. A ten-minute weekly ritual catches it: export the usage logs, group by model, compare input/output token ratios against last week, and re-price your three biggest flows with the public API. If a ratio moved and you did not change anything, a lane or a prompt changed under you — both are fixable in minutes once visible. The setup guides cover connecting common clients whose logs you will be reading.

Cost controls that keep the math honest

Three levers live in the product itself. Token groups let each key choose its optimization: default is price-first, stable is success-rate-first, guaranteed runs on merchant-supplied lanes. Conditional routes re-pick the best lane within 5 minutes as floors move. And the cost calculator applies the formula to typical workloads so you can sanity-check a budget in seconds. For protocol setup, see the setup guides.

FAQ

How is the Claude API billed on 321AI?

Per token: input and output billed separately in USD per 1M tokens at the market floor across competing suppliers, cache reads at a lower rate, settled per call to actual usage. Failed calls are never billed; platform fee is 0.

Does prompt caching actually reduce the bill?

Yes — cache reads bill below fresh input. Put stable content (system prompt, tool definitions, long reference documents) at the start of the prompt so repeated calls hit the cache instead of re-billing full input.

Do Opus, Sonnet and Haiku share one price?

No — each tier is priced separately, and each tier is itself quoted by multiple suppliers. The table above shows the live floor per tier; per-supplier quotes are on the marketplace.

Can I try Claude models before topping up?

Yes. Registration includes trial credit you can spend on any model. Set ANTHROPIC_BASE_URL to https://321ai.cc for Claude Code, or use the OpenAI protocol at https://321ai.cc/v1.

Keep reading

What is an AI API aggregation platform? How multi-supplier bidding keeps model prices low 9 checks before you top up an AI API relay GPT-5.x family pricing guide for developers Gemini 3.x pricing and long-context cost math DeepSeek vs GPT vs Claude: cost per task

Live prices: /en/models/ · billing: /en/pricing · setup: /en/guides/ · FAQ

All model pricesFeatured · 321AI communityFeatured · Open-source toolsFeatured · Advertise with usFeatured