Prompt caching is exactly what it sounds like: if a large chunk of your prompt stays the same across requests, the platform can reuse the already-processed version instead of charging full price to process it every time.
This is one of the easiest ways to cut AI API bills because most real systems repeat the same heavy text constantly: system prompts, tool definitions, policy documents, product catalogs, coding instructions, and stable background context.
How the major platforms handle it
OpenAI prompt caching
OpenAI documents prompt caching as a way to lower latency and cost, and its pricing pages expose separate cached-input rates for supported models. That means repeated prompt prefixes can become materially cheaper than sending the same full input cold each time.
Anthropic prompt caching
Anthropic supports both automatic caching and explicit cache breakpoints. Its pricing docs also describe prompt caching as reusing large repeated context at a fraction of normal input cost, which is especially useful for long system prompts or knowledge-heavy workflows.
Gemini context caching
Google frames this as context caching. The official overview says it can reduce both cost and latency for requests with repeated content, with implicit and explicit approaches depending on the product path.
What you should cache
- Stable system prompts
- Tool definitions and schemas
- Policy documents and support playbooks
- Large product catalogs or manuals
- Repeated project context for coding agents
- Long instructions that appear in every run
What you should not bury inside the cached block
- Frequently changing user-specific details
- Fresh search results or live state
- Dynamic variables such as today’s task, account data, or current page content
A good rule is simple: put the most stable content at the front, and push dynamic content later. That increases the chance of cache reuse.
Why coding agents waste so much money without caching
Coding agents often resend the same repository instructions, coding standards, tool manifests, safety rules, and review criteria in every step. Without caching, you pay repeatedly for information the model already processed minutes ago.
Caching does not make a bad workflow good. It makes a repeated good workflow much cheaper.
What Dera recommends
If your workflow repeats large instructions more than once, prompt caching should be one of the first optimizations you try. It is usually easier than model switching, safer than aggressive prompt trimming, and more durable than one-off hacks.