---
title: "Prompt caching"
type: "glossary term"
url: "https://aifordevs.org/glossary#prompt-caching"
markdown: "https://aifordevs.org/glossary/prompt-caching.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/glossary#prompt-caching"
---

# Prompt caching

Prompt caching is a hosted API feature that reuses the processed state of a repeated prompt prefix, such as a long system prompt or a document, across calls. Providers that offer it bill cached input tokens at a discount and return the first token sooner.

Hits need an exact match of everything before the cache point, so put stable content first and volatile content last. Anthropic hashes tools, then system, then messages, so changing a tool definition invalidates the whole cache. As of November 8, 2026, Claude charges 1.25 times the input price for a 5-minute write and 0.025 to 0.1 times for reads, while OpenAI caches automatically from 1,024 tokens on GPT-5.6 and later.

## Example

As of November 8, 2026, Claude Opus 5.5 lists $4 input, $5 cache write, and $0.20 cache read per million tokens. Ten calls within five minutes on a 100,000-token prefix cost $0.68 for that prefix with caching and $4.00 without.

## Source

[Anthropic docs: Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)

## Related terms

- [Prefix caching](https://aifordevs.org/glossary#prefix-caching)
- [KV cache](https://aifordevs.org/glossary#kv-cache)
- [Context engineering](https://aifordevs.org/glossary#context-engineering)
- [System prompt](https://aifordevs.org/glossary#system-prompt)
- [AI gateway](https://aifordevs.org/glossary#ai-gateway)
- [Batch API](https://aifordevs.org/glossary#batch-api)
- [TTFT](https://aifordevs.org/glossary#ttft)

## Read the article

[Context engineering: budget and order the context window](https://aifordevs.org/articles/context-engineering)

## Cite this term

AI for Devs. "Prompt caching." https://aifordevs.org/glossary#prompt-caching

- Page: https://aifordevs.org/glossary#prompt-caching
- Markdown: https://aifordevs.org/glossary/prompt-caching.md
- Reuse: Quote or summarize with a link to this page. Terms: https://aifordevs.org/reuse
- Publisher: AI for Devs
