Skip to content

Cache hit rate and billing explained

· 5 min read · OpusVIP

Short answer

A cache write costs 1.25x the input price (5-minute lifetime) or 2x (1-hour lifetime). Context resent while the cache is still valid is billed as a cache read, a small fraction of the input price. Hit rate = cache reads ÷ (cache reads + cache writes + regular input), and it climbs the longer you stay in one session.

When you code with Claude Code, most of the bill usually comes not from the few lines you type but from the context resent every turn. Prompt caching exists for exactly that.

Three input rates

Here are the rates for Opus 5.5 on OpusVIP, in credits per 1M tokens (1 credit = $0.01 at list price; 100 credits cost you $0.15). The other models use the same cache-write ratios, but cache-read prices vary by model; see the price table.

  • Regular input: 400 credits
  • Cache write (5-minute lifetime): 500 credits, about 1.25x regular input; the 1-hour lifetime is 800 credits, 2x
  • Cache read: 20 credits, 1/20 of regular input

Writing to the cache costs a little more, but every later read is very cheap, so the longer the session, the more you save. These ratios come from Anthropic's pricing, and OpusVIP applies them unchanged.

How to calculate hit rate

A simple definition: hit rate = cache read tokens ÷ (cache read + cache write + regular input). With the illustrative numbers from Example 2 in Billing and caching (30,000 read, 2,500 written, 800 regular input), the hit rate is about 90.1%.

Hit rate depends on how Claude Code structures its prompts and whether the gap between two requests exceeds the cache lifetime. It's best to calculate it from your own log.

Getting more from the cache

  • Keep working in one session rather than opening new ones often.
  • After a pause longer than the cache lifetime, the next turn rewrites the cache. That's expected.
  • Avoid changing the system prompt or large config blocks mid-conversation, since a changed prefix invalidates the cache.

How to verify

The console log lists cache write and cache read tokens for every request. Recompute any entry with the formula, and if anything looks off, email hello@opusvip.dev. More tips in How to choose a Claude Code relay.


Questions? Email hello@opusvip.dev.