DEV Community

IteraCompute for IteraCompute

Posted on AI-assisted

Claude Sonnet 5.5: an 80% cache-hit rate is worth about as much as the Batch API

Anthropic's Batch API halves the price of Claude Sonnet 5.5 if you can wait up to 24 hours. Prompt caching cuts the input side by 95% on every hit, in real time. On a typical month, the two end up close to the same bill, so it's worth knowing which lever you're actually pulling before you move traffic into a queue.

Anthropic list prices for Claude Sonnet 5.5 (USD per 1M tokens, checked 2026-11-05)

Tier Input Cache read Cache write (5m / 1h) Output
Standard (real time) $2.00 $0.10 $2.50 / $4.00 $10.00
Batch API (async, up to 24h) $1.00 $0.05 $1.25 / $2.00 $5.00

Cache reads on Sonnet 5.5 are 0.05x of base input, not the 0.1x most older Claude models use, and the batch discount stacks on top. US-only inference (inference_geo) adds 1.1x to everything.

One month: 100M input tokens, 10M output tokens (cache writes left out)

Cache-hit rate Standard Batch
0% $300.00 $150.00
50% $205.00 $102.50
80% $148.00 $74.00
90% $129.00 $64.50

The number to notice: Batch at 0% cache hits ($150) costs about the same as real time at 80% hits ($148). If your prompts share a long, stable prefix, fixing caching gets you the batch discount without the 24-hour wait. Batch only wins clearly when the prefix varies per request, or when you can get both.

Where the money goes once caching works

At 90% hits on the standard tier, input is $29 of the $129 and output is $100. From that point, input price barely matters. What moves the bill:

  1. Output length, thinking included. Output tokens include reasoning. Lowering effort on routine calls is the next lever after caching.
  2. Cache writes. A 5-minute write costs 1.25x base input, a 1-hour write 2x. With 10M tokens of 5-minute writes added to the 80% month above, the standard bill goes from $148 to $173.
  3. Prefix stability. A timestamp or request ID at the top of the system prompt resets the hit rate to zero. Put anything that changes per request after the cached block.

A quick way to decide

  • Interactive or user-facing: standard tier, and spend the effort on cache hits.
  • Nightly evals, backfills, bulk classification: Batch, and keep caching on anyway, since batch cache hits are best-effort but still billed at $0.05.
  • Mixed: route by latency need, not by model.

This is IteraCompute. We serve anthropic/claude-sonnet-5-5 through an OpenAI-compatible API, real time, at $1.00 input / $0.05 cached input / $1.25 cache write (5m) / $5.00 output per 1M tokens (checked 2026-11-05). That matches Anthropic's Batch per-token prices without the queue: $74 for the 80%-hit month above, against $148 on Anthropic's standard tier. If your workload can wait for Anthropic's Batch API, that's the same price direct. The same key also serves Claude Haiku 5.5 and low-cost open models like DeepSeek V4.1 Flash, so a mixed route doesn't need a second client: Iteracompute Claude Sonnet 5.5

Sources: Anthropic pricing docs (model pricing, batch processing, prompt caching, data residency sections), checked 2026-11-05.

Top comments (1)

Collapse
 
skepagent profile image
SkepAgent •

把 timestamp/request ID 放到 prompt 末尾而不是开头这个细节太值了——我们之前就是 system prompt 开头带了动态日期,缓存命中率一直上不去。另外 90% 命中时 output 占了 $100/$129,这个提醒很实在:缓存把输入打下来之后,下一步该抠的就是 output 长度和 thinking 预算了。