Pricing and Billing
Claude input and output are billed at a discount per model, while cache reads and writes are billed at the official list price; verify call costs using the categorized billing examples.
Claude input and output are billed at the discount for that model; cache reads and cache writes are billed at the official list price with no discount. Unit prices and discounts for each model are listed in Models and Pricing . For GPT, MiMo, and image generation models, check their respective billing units and pricing; the token examples on this page are for Claude.
How Much Is Charged Per Call
Section titled “How Much Is Charged Per Call”Each call is billed separately for the four token categories in the response usage:
费用 = ( 输入 token × 输入单价 + 缓存写入 token × 缓存写单价 + 缓存读取 token × 缓存读单价 + 输出 token × 输出单价 ) ÷ 1,000,000
输入单价、输出单价 = 对应官方单价 × 该模型折扣缓存读取单价、缓存写入单价 = 对应官方原价The four token categories correspond to these fields in the response:
| Billing Item | usage Field (Anthropic Native) | Official Unit Price Relative to Input Price |
|---|---|---|
| Input | input_tokens | 1× |
| Cache Write | cache_creation_input_tokens | 1.25× (5-minute cache), 2× (1-hour cache, "ttl": "1h") |
| Cache Read | cache_read_input_tokens | 0.1× (0.05× for Opus 5.5 and Sonnet 5.5, 0.025× for Fable 5.1) |
| Output | output_tokens | Varies by model; see the pricing page |
The official cache multipliers come from the Anthropic Prompt Caching documentation . Cache usage on this site is billed at the corresponding official list price, without applying the input/output discount again.
1-hour cache write tokens are recorded separately in cache_creation.ephemeral_1h_input_tokens and billed at 2 times the official input price, without applying the input/output discount. The cache write unit prices listed on the pricing page are for the 5-minute cache.
Example Calculation
Section titled “Example Calculation”The unit prices below are round numbers chosen for demonstration and do not correspond to any specific model; see the pricing page for actual unit prices.
Assume a model’s official unit prices (per million tokens): input $3, output $15, cache write $3.75, cache read $0.30. The usage for one Claude Code request is:
{ "input_tokens": 2000, "cache_creation_input_tokens": 1500, "cache_read_input_tokens": 30000, "output_tokens": 800}At official prices:
| Item | Tokens | Official Unit Price | Official Cost |
|---|---|---|---|
| Input | 2,000 | $3 | $0.006 |
| Cache Write | 1,500 | $3.75 | $0.005625 |
| Cache Read | 30,000 | $0.30 | $0.009 |
| Output | 800 | $15 | $0.012 |
| Total | $0.032625 |
Assume this example model’s input and output are billed at 20% of the official price (for demonstration only, not representing current model pricing), then:
输入费用 = $0.006 × 0.2 = $0.0012输出费用 = $0.012 × 0.2 = $0.0024缓存费用 = $0.005625 + $0.009 = $0.014625合计 = $0.018225You cannot simply multiply the official total cost by the input/output discount, because the cache portion is not discounted.
If the cache misses on the same request, those 30,000 tokens are billed at the model’s discounted input price. Whether this saves money depends on comparing the model discount, cache write cost, and the number of repeated reads — you cannot compare official prices alone. For configuration and verification methods, see Prompt Caching .
System Prompt Billing
Section titled “System Prompt Billing”The Claude API comes from official subscription account pools. Calls made through Claude Code do not include any additional content. Other clients (SDK, curl, and third-party tools) attach a system prompt to every request, billed as input tokens: approximately 350 tokens for Sonnet 4.6 and approximately 500 tokens for the 5.x series. This portion is counted together with your own content in the response usage’s input_tokens.
Measured on 2026-10-15 by sending “Reply with just: ok” via curl:
| Model | count_tokens Count | Actual input_tokens | Attached System Prompt (Approx.) |
|---|---|---|---|
| Sonnet 4.6 | 19 | 370 | 350 tokens |
| 5.x series | 18–19 | 510–530 | ~500 tokens |
count_tokensonly counts what you send and does not include this system prompt. When estimating costs with the SDK, curl, or third-party tools, add the numbers from the table above; Claude Code does not need this.- The input tokens recorded in the call log already include this portion; recalculating with the formula above will match the charges in the log.
- The shorter the request, the higher this portion’s share; in long-context requests it is a very small fraction.
Balance and Currency
Section titled “Balance and Currency”- Charges are calculated using the USD formula above and deducted from your account balance. Balances are denominated in USD.
- Top-up principal is credited in USD; payment processing service fees are listed separately and are non-refundable. Available payment methods and amount limits are subject to the wallet order page.
How to Verify Discounts and Costs
Section titled “How to Verify Discounts and Costs”First check the model’s input/output discount, then calculate input, output, cache read, and cache write separately. Each charge can be recalculated in the call log using the corresponding unit price.
Same task — why is this time more expensive than last time?
The most common reason is a cache miss: too much time elapsed between the two requests (default cache is 5 minutes), the first part of the context changed, or the model was switched. Open the call log and compare the cache read tokens of the two entries to see.
Are cached tokens discounted too?
No discount. Cache reads and cache writes are billed at the official list price; input and output are billed at each model’s discount.
Why is input_tokens larger than what I sent?
Calls made through Claude Code do not include any additional content. Other clients (SDK, curl, and third-party tools) attach a system prompt to every request, billed as input tokens: approximately 350 tokens for Sonnet 4.6 and approximately 500 tokens for the 5.x series. Measured data is in System Prompt Billing .
How do I verify a charge?
Find the entry in the call log, plug the four token counts and the unit prices from the pricing page into the formula above; the result should match the charge in the log. If it does not match, send us the timestamp and model of that log entry.
