Free modelsExplainedDaily archiveLive dashboard
LLM API guide

Prompt Caching Explained: Claude, OpenAI, Gemini, Grok

Prompt caching lets an LLM API reuse the start of a prompt it saw recently, so you pay up to 90% less for that part and get answers faster. Here is how it works at Claude, OpenAI, Gemini, Grok and DeepSeek, with today's cached prices.

What prompt caching is

Many requests start the same way: the same system prompt, the same document, the same codebase, then a new question at the end. With prompt caching, the provider keeps that shared beginning (the prefix) for a few minutes. When the next request starts with exactly the same text, the cached part is read back at a fraction of the normal input price, and the answer starts sooner.

Caching only works on an exact match from the very first token. Put things that never change first and things that change (the user's question, today's date) last.

Cached prices today

ModelInput / 1MCached input / 1MSaving
Anthropic: Claude Fable 5.2$8$0.298%
OpenAI: GPT-6.2 Astra Pro$8$0.495%
Google: Gemini 4 Neon$3$0.1595%
DeepSeek: DeepSeek V4.1 Flash 1017$0.3$0.00698%
SpaceXSI: Grok 4.7$2$0.575%

From OpenRouter's live price list, Mon, 23 Nov 2026 10:01 UTC.

How each provider does it

Checked against each provider's caching docs on 22 November 2026.

What it saves: a worked example

A coding assistant sends the same 50,000-token codebase with 100 questions in a row (500 tokens each, 500-token answers) on Claude Fable 5.2. Without caching that costs $42.40. With caching (one 1.25× write, then 99 cached reads) it costs about $3.89, 91% less.

Next: compare prices

Ready to pick a model? See the LLM API pricing table for all 360 models, the cheapest LLM APIs, and the cost calculator. By lab: Claude, OpenAI, Gemini, DeepSeek, Grok, Mistral, Qwen, Kimi, Meta Llama.

Questions

What is prompt caching?

A discount for repeated prompt beginnings: the provider stores the start of your prompt for a few minutes and charges much less when the next request reuses it exactly.

How much does prompt caching save?

Cache reads cost 10% of the normal input price or less at Anthropic and OpenAI. On Claude Fable 5.2, cached input is $0.2 against $8 per million tokens.

How long does a prompt cache last?

Claude: 5 minutes by default, refreshed each use, or 1 hour at a higher write price. OpenAI: 30 minutes by default, or 12 hours. Check the provider's docs for others.

Do I have to turn prompt caching on?

OpenAI, Gemini, Grok and DeepSeek cache automatically. Claude needs cache_control on the request, or automatic caching turned on.

What is the difference between prompt caching and KV caching?

KV caching is the internal memory a model keeps while writing one answer. Prompt caching keeps that work between separate requests, so a repeated prefix doesn't have to be processed again.

Get this in your inbox at 7am

One free email each morning with the AI repos, models and stories that are picking up speed, including new free models. Your own time zone, no spam.

See today's email