How much does prompt caching save on LLM API costs?
Caching 70 % of an 8,000-token prompt at a 90 % discount cuts a $4,725 monthly bill to about $2,457, a 48 % saving at example $3/$15 prices.
Last updated:
Cost per month
$2,457.00
- Cost per request
- $0.01638
- Cost per 1,000 requests
- $16.38
- Cost per year
- $29,484
- Tokens per month
- 1,275 M tokens
- Share from output tokens
- 46 %
Results are engineering estimates for planning. Final designs must follow your local code and be checked by a qualified professional.
This scenario at a glance
| Requests | 5,000 per day |
|---|---|
| Input tokens per request | 8,000 tokens |
| Output tokens per request | 500 tokens |
| Input price per 1M tokens | 3 $/1M |
| Output price per 1M tokens | 15 $/1M |
| Share of input served from cache | 70 % |
| Discount on cached input | 90 % |
| Batch API (50 % off) | No (real-time) |
| Cost per month | $2,457.00 |
|---|---|
| Cost per request | $0.01638 |
| Cost per 1,000 requests | $16.38 |
| Cost per year | $29,484 |
| Tokens per month | 1,275 M tokens |
| Share from output tokens | 46 % |
Engineering notes for this workload
Prompt caching lets an API provider store the processed state of a prompt prefix and reuse it on later requests that start with the same tokens. Cached input is billed at a fraction of the normal price, commonly around 10 %, and responses can start faster because the prefix does not have to be processed again.
This scenario takes the RAG workload from the companion page, 5,000 queries a day with 8,000 input and 500 output tokens, and assumes that 70 % of the input, the system prompt, policies and a stable document set, is identical across requests and served from cache. The effective input price drops from $3 to $1.11 per million tokens, and the monthly cost falls from $4,725 to about $2,457, a saving of 48 %.
Structure prompts for caching. Caches match exact prefixes, so place stable content first and variable content last: system instructions, tool definitions, reference documents, then the conversation and the user's question. A single changed character early in the prompt, such as a timestamp or a user name in the system prompt, invalidates the cache for everything after it.
Understand the provider's rules. Some providers cache automatically above a minimum prompt length; others require explicit cache markers. Cache entries usually expire after a few minutes without use, though some offer longer retention for a fee, and writing to the cache can cost more than a normal input token. Steady traffic keeps the cache warm; bursty or rare requests may not benefit.
Measure, do not assume. API responses typically report how many input tokens were read from cache and how many were written. Log those fields, compute your real cache hit rate per endpoint, and enter it in the calculator to forecast cost accurately.
Caching complements, rather than replaces, reducing prompt size: trimming unnecessary context lowers both cached and uncached costs.
Reference table
| Workload | Input tokens | Output tokens | Notes |
|---|---|---|---|
| Chat turn with system prompt | 500–2,000 | 150–600 | History grows each turn |
| RAG answer | 3,000–10,000 | 300–800 | Retrieved chunks dominate |
| Document summary | 2,000–20,000 | 200–500 | Batch-friendly |
| Classification / tagging | 100–500 | 1–20 | Ideal for small models |
| Coding assistant | 10,000–50,000 | 500–3,000 | Large cached context |
| Agent tool step | 5,000–50,000 | 200–2,000 | Many steps per task |
Rule of thumb for English: 1 token ≈ 4 characters ≈ 0.75 words. Other languages and code usually need more tokens per word.
Questions about this scenario
What is prompt caching?
A provider feature that reuses the processed prefix of a prompt across requests and bills those tokens at a discount.
How much does prompt caching save?
Here 48 % of the monthly cost, with 70 % of input cached at a 90 % discount. Savings depend on the cache hit rate and output share.
Why is my prompt not being cached?
Common causes are changing content early in the prompt, prompts below the minimum cacheable length, or cache expiry between infrequent requests.