Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Prompt caching can make repeated input cheaper, but only when a request reuses a sufficiently long matching prefix that is still cached. A cache write may cost more than ordinary input; savings come from later cache reads. The practical question is how many times you reuse that prefix—and whether your API’s usage data confirms the hits.

What prompt caching reuses

Prompt caching avoids repeating some of the model’s processing for an unchanged beginning of a prompt. OpenAI describes its cache as storing key-value (KV) states, “not the tokens themselves.” When a later request has an eligible matching prefix, the model can reuse those saved states while processing the new material and generating a new answer. OpenAI’s prompt-caching guide

That distinction matters: caching does not reuse an answer, and it does not automatically discount every token in a request. It can reduce the billed cost of eligible repeated input. New user text, changing tool results, and generated output are separate; output-token charges still apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a repeated prompt actually gets a cache hit

A cache hit depends on provider-specific conditions. The shared prefix must meet the model’s minimum length, match in the way the provider recognizes, and remain available when the request arrives. Similar prompts are not necessarily identical eligible prefixes. A configured cache is not proof that a request used it.

The following thresholds are those stated in the cited provider documentation accessed or updated in 2026; model support and rules can change.

API Mode and documented minimum Retention or timing How to verify cached input
OpenAI For GPT-5.6 and later, implicit and explicit caching; minimum 1,024 visible tokens. Earlier models have model- and request-dependent minimums. Depends on model and caching mode; see current guide. usage.input_tokens_details.cached_tokens and cache_write_tokens
Anthropic Claude API Automatic and explicit caching on active Claude models; the cited page does not state one universal minimum. Five-minute and one-hour cache-write options are documented. Cache-creation and cache-read token counts
Google Gemini API Implicit caching is enabled by default for Gemini 2.5 and newer. The guide lists 2,048 tokens for Gemini 2.5 Flash and Pro, and 4,096 tokens for its listed Gemini 3.x models. Implicit caching behavior is provider-managed; explicit cached content uses a resource with a TTL and model binding. usage.total_cached_tokens

Sources: OpenAI prompt-caching guide, Anthropic prompt-caching documentation, and Google Gemini caching guide (last updated 2026-09-02 UTC). Treat the threshold as a minimum, not a promise of a hit.

Rank #2
Sale
The Psychology of Money: Timeless lessons on wealth, greed, and happiness
  • Ideal for Gifting
  • Ideal for a bookworm
  • Compact for travelling

Why cache writes and reads have different prices

Creating a cache and reading from it are billed differently. A write can carry a premium over standard input, while a read can be much cheaper. The break-even point therefore depends on the model’s prices, how much of each request is reusable, and how often that content is reused before it expires or becomes unavailable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

OpenAI

For GPT-5.6 and later, OpenAI’s documentation states that cache writes cost 1.25 times standard uncached input and reads cost 0.1 times standard input on most models, or 0.05 times for GPT-6.1 Sol. At the 0.1× read rate, OpenAI illustrates one write plus one full read at 1.35× the cost of one ordinary input pass per prompt, versus 2× for two uncached passes. One write plus nine full reads is illustrated at 2.15×, versus 10× uncached. These are provider cost illustrations for the stated multipliers, not a guarantee for a workload; they exclude any differences in reusable token counts and generated output. OpenAI documentation

Anthropic Claude API

Anthropic’s documentation lists five-minute cache writes at 1.25× the base input price, one-hour writes at 2×, and cache reads at 0.1×. The actual dollar cost depends on the Claude model’s base prices; do not apply one model’s dollar price to another model or platform. Anthropic documentation

Google Gemini API

Google’s caching guide explains implicit and explicit caching, but the cited guide does not establish a single current savings multiplier to apply across models. Check the pricing for the exact Gemini model and caching method before estimating savings. Google Gemini caching guide

How to estimate whether caching is worthwhile

Compare the cost of processing the same input repeatedly without caching with the actual write, read, and uncached portions of the cached requests. Use the current input prices for the exact model and API platform. Keep output costs separate: caching changes the cost of eligible input processing, not the cost of the answer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Measure the reusable prefix. Count only the shared, eligible beginning—not the whole prompt if user input or tool results differ.
  2. Price the first request as a write. Apply the provider’s cache-write rate to the tokens actually written, and include any input that remains uncached.
  3. Price later requests by usage. Apply the cache-read rate only to tokens reported as cached. Price changing suffix tokens at the ordinary input rate.
  4. Add output separately. Include generated tokens at the model’s output rate for both cached and uncached cases.
  5. Compare totals over the reuse window. Account for cache expiration, misses, and any cache writes needed again. A high write premium or few reuses can erase the benefit.

In compact form, cached input cost is: write-priced tokens on creation + read-priced tokens on confirmed hits + ordinary input-priced uncached tokens. Compare that with the ordinary input price for all input tokens over the same requests. Use observed token counts, not the assumption that a cache setting guarantees reuse.

Best Value
Sale
I Will Teach You to Be Rich: No Guilt. No Excuses. Just a 6-Week Program That Works (Second Edition)
  • It can be a gift option
  • Comes with secure packaging
  • Helpful in various ways
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to arrange prompts for better reuse

Put stable, shared material first and changing content later, where the provider’s interface permits it. A practical sequence is:

  1. Shared system and developer instructions
  2. Stable tool definitions and common reference material
  3. Current user request and other per-request details
  4. Changing tool results or other turn-specific content

This ordering gives repeated requests a better chance of sharing a long prefix. Avoid changing the beginning of the prompt unnecessarily. Google also recommends placing large common content first and sending similar prefixes close together. The provider’s matching and caching behavior still determines whether that design produces a hit.

How to confirm that savings are real

Inspect usage on actual API responses, then compare the resulting costs with a baseline for the same workload. Track cached tokens, cache-write tokens, total input, latency, and realized cost; look at enough requests to include misses and cache expiration, not just a favorable example.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • OpenAI: Review usage.input_tokens_details.cached_tokens and cache_write_tokens alongside input counts. The guide also recommends tracking latency and realized cost.
  • Anthropic: Check the reported cache-creation and cache-read token counts.
  • Gemini: Check usage.total_cached_tokens.

If cached-token counts remain zero, investigate prefix length, exact prompt ordering, model eligibility, cache timing, and whether the request uses the expected API mode. Do not infer a hit from a successful response or from enabling caching in code. Pricing and model support are volatile; consult the linked documentation and current model pricing when making a production estimate.

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 2
The Psychology of Money: Timeless lessons on wealth, greed, and happiness
The Psychology of Money: Timeless lessons on wealth, greed, and happiness
Ideal for Gifting; Ideal for a bookworm; Compact for travelling
$10.99
SaleBestseller No. 5
I Will Teach You to Be Rich: No Guilt. No Excuses. Just a 6-Week Program That Works (Second Edition)
I Will Teach You to Be Rich: No Guilt. No Excuses. Just a 6-Week Program That Works (Second Edition)
It can be a gift option; Comes with secure packaging; Helpful in various ways
$9.15

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.