The estimate I built on an old price table
I once sent a cost estimate for an app feature using a price table I had saved months earlier. A few days later I opened the official pricing page again and my hands stopped: the lineup had changed, and so had the rates. The estimate was off by a full model generation.
What I'd like to say first is that API prices are not something to memorize; they're something to re-check every time. This guide is my recalculation against the official price table as of October 2026. Rates keep moving, so please compare against the official page before you commit to a budget.
Current Model Pricing (October 2026)
Prices are in USD per million tokens. These are the three models most people start from today.
| Model | Input | Output | Typical use |
|---|---|---|---|
| Claude Opus 5.5 | $4 | $20 | Hard reasoning, long-running work |
| Claude Sonnet 5.5 | $2 | $10 | Everyday coding and writing |
| Claude Haiku 5.5 | $0.10 | $0.50 | Classification, light tasks (prompts up to 100K tokens) |
Haiku 5.5 has two tiers. Prompts over 100K tokens pay $0.50 input and $2.50 output, and the prompt length counts cache reads and writes too. A request that's partly a cache hit still pays the higher rate if its total length crosses the line, which is easy to miss.
Above these sit Fable 5.1 and Mythos 5.1 at $10 input and $50 output. I'll leave them out of the estimates below. Older models remain listed as well: Sonnet 4.6 is $3 / $15 and Haiku 4.5 is $1 / $5. For a new build, I'd look at the newer generation first.
The tokenizer change that doesn't show up in the rate card
Models from Claude 4.7 onward use a newer tokenizer that produces roughly 30% more tokens for the same text; Sonnet 4.6 and earlier use the previous one. A lower rate therefore doesn't automatically mean a lower bill. If the rate drops by a third and the token count rises by a third, you end up close to where you started. Japanese and other non-English text already costs more tokens per character, so I'd measure with your real inputs rather than estimating from characters.
Measuring Tokens and the Cost of One Request
The measurement is just the usage field on the response.
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=1024,
messages=[
{"role": "user", "content": "Write a Fibonacci function in Python"}
],
)
print(f"Input tokens: {response.usage.input_tokens}")
print(f"Output tokens: {response.usage.output_tokens}")
# Example output (actual values depend on the prompt and model):
# Input tokens: 28
# Output tokens: 312On Sonnet 5.5 that's 28 × ($2 / 1,000,000) plus 312 × ($10 / 1,000,000), about $0.003. One call is tiny. What matters is the same call repeated thousands of times a day.
Cost Estimates for Common Use Cases
The token counts below are assumptions; swap in numbers from your own logs.
Scenario 1: Ticket classification (10,000 requests/month)
Haiku 5.5, 500 input and 300 output tokens each. Input is 5M tokens × $0.10 = $0.50, output is 3M × $0.50 = $1.50, so about $2/month.
Scenario 2: Code review (1,000 runs/month)
Sonnet 5.5, 3,000 input and 1,500 output tokens each. Input $6 plus output $15 is about $21/month.
Scenario 3: Long document analysis (100 runs/month)
Opus 5.5, 50,000 input and 5,000 output tokens each. Input $20 plus output $10 is about $30/month.
Side by side, what drives the bill is less the rate gap between models than how large each request's input is.
Save 50% with Batch API
For work that doesn't need an immediate answer, Batch API charges 50% of the standard input and output rates, processed asynchronously. On Sonnet 5.5 that's $1 input and $5 output.
import anthropic
client = anthropic.Anthropic()
batch = client.messages.batches.create(
requests=[
{
"custom_id": "review-001",
"params": {
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Review this code: def add(a, b): return a + b"}
],
},
},
{
"custom_id": "review-002",
"params": {
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Optimize this SQL: SELECT * FROM users WHERE age > 20"}
],
},
},
]
)
print(f"Batch ID: {batch.id}")
print(f"Status: {batch.processing_status}")
# Example: Status: in_progressIt suits bulk translation and classification, scheduled reports, and dataset-wide analysis: jobs you can send at night and collect in the morning. Fast mode, however, isn't available with Batch API.
Cut Input Costs with Prompt Caching
If you resend the same system prompt or reference material, Prompt Caching is the lever. The multipliers are fixed:
- 5-minute cache write: 1.25× the base input price
- 1-hour cache write: 2×
- Cache read: 0.1× normally (0.05× on Opus 5.5 and Sonnet 5.5)
Per the official table, a 5-minute write breaks even after one read and a 1-hour write after two.
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=1024,
system=[
{
"type": "text",
"text": "You are a senior engineer. Review code against the following conventions... (long conventions text)",
"cache_control": {"type": "ephemeral"},
}
],
messages=[{"role": "user", "content": "Review this function: ..."}],
)
print(f"Input tokens: {response.usage.input_tokens}")
print(f"Cache creation: {response.usage.cache_creation_input_tokens}")
print(f"Cache read: {response.usage.cache_read_input_tokens}")
# Second call onward, for example:
# Cache creation: 0
# Cache read: 20000A concrete case: a 20,000-token conventions prompt, 100 Sonnet 5.5 calls inside the 5-minute window.
- Without caching: 2,000,000 tokens × $2 = $4.00
- With caching: one write of 20,000 × $2.50 plus 99 reads of 1,980,000 × $0.10, about $0.25
That's roughly 94% off the shared prefix. The cache expires after five minutes, so for spaced-out jobs consider the 1-hour cache. The official table states that Batch API discounts and cache multipliers stack.
Stacking the Discounts — Turning It Into a Formula
The official price table says Batch API's 50% and Prompt Caching multipliers stack. Typing the arithmetic into a calculator every time wore me out, so I keep this small function nearby. The rates are the Sonnet 5.5, Opus 5.5 and Haiku 5.5 figures from the table above.
PRICES = {"sonnet-5-5": (2.0, 10.0), "opus-5-5": (4.0, 20.0), "haiku-5-5": (0.10, 0.50)}
def cost(model, inp, out, batch=False, cache_read=0, cache_write=0):
pi, po = PRICES[model]
read_mult = 0.05 if model in ("sonnet-5-5", "opus-5-5") else 0.1
usd = (inp * pi + cache_write * pi * 1.25 + cache_read * pi * read_mult + out * po) / 1_000_000
return usd * (0.5 if batch else 1)
print(round(cost("sonnet-5-5", 3000, 1500), 4)) # 0.021
print(round(cost("sonnet-5-5", 3000, 1500, batch=True), 4)) # 0.0105
print(round(cost("sonnet-5-5", 500, 1500, batch=True, cache_read=2500), 4)) # 0.0081The third line is a request where 2,500 of 3,000 input tokens hit the cache and the job also runs through Batch. The cost drops from $0.021 to about $0.008. One caveat: Haiku 5.5 changes its rate once the prompt passes 100,000 tokens, so the function is only valid below that line for Haiku.
What Long Contexts Cost
Whether a long document raises the per-token rate changes how you estimate. According to the official table, models from Claude 4.6 onward (except Haiku 5.5) price the full 1M-token window at standard rates. A 90k-token request and a 900k-token request cost the same per token.
Haiku 5.5 is the exception. As noted above, once the prompt length — cache reads and writes included — passes 100,000 tokens, the whole request is billed at the higher rate. If you're feeding a long document to the lightest model, work out that boundary once before the invoice does it for you.
Also, cache reads on Fable 5.1 and Mythos 5.1 are 0.025× the input rate. If you cache heavily on a top-tier model, that difference adds up.
Three Add-ons That Move the Bill After the Multiplication
Once the price table has been multiplied out, three items can still shift the total. I check these on a separate line at the end of every estimate.
First, data residency. On Claude 4.6 and later, setting inference_geo: "us" applies a 1.1x multiplier to every token category. Older models don't support the parameter and return a 400 error if you include it. If you need US-only inference, Sonnet 5.5's $2 input rate effectively becomes $2.20.
Second, Fast mode. On Opus 5.5 it costs $8 input and $40 output, twice the standard rate, and as noted above it can't be combined with the Batch API, so it doesn't belong in any estimate that assumes stacked discounts.
Third, older generations. The official price table marks Sonnet 4.5 as deprecated. If any call site still names it, take stock of the replacement and the migration timing before you finalize the estimate.
None of these change the numbers in the table itself. They are the items I'd rather learn about before sending an estimate than after.
How to Choose the Right Model
I find it easier to choose by how many retries you'll need than by raw capability.
- Haiku 5.5: classification, extraction, short replies where the answer's shape is fixed.
- Sonnet 5.5: coding help and writing where quality and speed both matter. Usually my first attempt.
- Opus 5.5: multi-step reasoning, and long jobs you can't afford to see fall apart midway.
In practice I start on Sonnet 5.5 and move only the weak spots to Opus 5.5. For tasks that return the same shape every time, I'd try dropping to Haiku 5.5 at least once.
For implementation patterns that combine Batch API, Prompt Caching and Adaptive Thinking, see the Claude API cost optimization production guide.
Looking back
Costs come down along three axes: model choice, Batch API, and Prompt Caching. The price table underneath them changes faster than I expect.
Every estimate gets a date and a source. Since I adopted that rule, my numbers haven't drifted by an order of magnitude. A good next step is to pull ten real requests from your own logs, note their input and output tokens, and multiply them by the rates on the official pricing page.