Prompt Caching
Cut Claude cost and latency by up to 90% with prompt caching: cache the stable prefix (system prompt, tools, documents, history), pay full price once, then read at ~10%.
Last updated
Prompt Caching: Pay Once for the Prefix
Every Claude call re-sends the whole prompt — system, tools, documents, history — and you pay to re-process it every time. Prompt caching makes Claude remember the expensive, stable part, cutting repeated-context cost by up to 90% and latency with it.
The Messages API is stateless, so a RAG call with a 20-page document, or an agent on turn 30, re-sends and re-processes a huge identical prefix every single request. Prompt caching lets you mark that prefix with a cache breakpoint: the first call writes it to a server-side cache; every later call with the same prefix reads it for a fraction of the price and skips reprocessing it. Cache reads cost about 10% of normal input tokens. For any workload with a big, stable prefix — and almost all of them have one — this is the single highest-leverage cost and latency optimization available.