Prompt Caching
Cut Claude cost and latency by up to 90% with prompt caching: cache the stable prefix (system prompt, tools, documents, history), pay the write premium once, then read for a fraction of the input price (0.1x on most models, 0.05x on Opus 5.5 and Sonnet 5.5).
Last updated
After this section you can
- Place cache breakpoints so the stable prefix is cached and the volatile tail is not
- Work out write-versus-read costs per model and choose a TTL
- Find silent invalidators and prove caching works from the usage fields
Prompt Caching: Pay Once for the Prefix
Every call resends tools, system prompt and history, and you pay to process them again. Prompt caching lets later calls read that repeated prefix at a fraction of the price and with less wait, as long as its bytes do not change.
Mark where the stable part of your prompt ends with cache_control. The first call writes that prefix at a small premium; calls in the next few minutes that start with exactly the same bytes read it at a fraction of the price: 0.1× on Haiku 5.5 and Opus 5, 0.05× on Sonnet 5.5 and Opus 5.5, 0.025× on Fable 5.1. Change one byte and everything after it is a miss.