# The Write Is a Bet: A Prompt Caching and Batch API Runbook for Late 2026

> Source: <https://dev.to/signalsilicon/the-write-is-a-bet-a-prompt-caching-and-batch-api-runbook-for-late-2026-5cdh>
> Published: 2026-12-05 02:44:10+00:00

**Recommendation:** Model your request spacing before enabling cache writes: keep prefixes cached only when at least two requests fall inside the 30-minute window, and avoid 12-hour writes unless three requests land within 12 hours.
More in the playbook "Controlling LLM cost": <https://wpnews.pro/playbooks/llm-cost>

For two years prompt caching was sold as a discount: send the same system prompt again and the reused tokens billed at a tenth of the input price, so cache everything that repeats. That advice now costs money. On OpenAI's GPT-5.6 and later, a cache write bills at 1.25 times the input rate for the default 30-minute lifetime, or 2.5 times for a 12-hour one. Anthropic has charged 1.25 and 2 times for its two lifetimes all along. Google bills explicit caches by the token-hour, at $0.50 per million tokens per hour on Gemini 3.8 Flash through 31 December 2026. The cache stopped being a discount you receive and became a window you rent.

So the write is a bet: a premium now for the chance to read those tokens cheaply before the window closes. Whether it wins depends less on the model than on how long your traffic waits between requests. Take a 48,000-token prefix and 1,000 requests. At one a minute it costs $4.92 to serve on GPT-6.2 Sol instead of $96. At 45-minute spacing the same caching configuration costs $120, 25 percent more than not caching at all.

**At a glance**

No affiliate links in this post. The provider rates below are the subject of the article, not a sponsorship.

Every provider now publishes three numbers for a prefix token: the input rate, a cached-read rate and a write rate. They are alternatives, not layers. OpenAI is explicit that a cache-write charge "is not an additive fee" — each token is billed once, at one of the three rates.

On GPT-6.2 Sol a million input tokens cost $2.00, a cached read costs $0.10, and a 12-hour write costs $5.00. Sonnet 5.5 runs $2.00, $0.10 and $4.00 for its 1-hour write, with the 5-minute write at $2.50. Gemini 4 Neon charges nothing to write and $0.15 to read, because implicit caching has no write step.

The write only makes sense as a purchase of time. Pay 1.25 times once, then read at a tenth as often as you can inside 30 minutes: two requests beat paying full price twice, and ten cost 2.15 times the price of one instead of ten times. The 12-hour write is a bigger bet at 2.5 times and needs three requests inside 12 hours to beat the uncached bill.

Reads treat the clock differently, and this is where runbooks go wrong. OpenAI's 30-minute entries are extended by each read, but a 12-hour entry keeps its original expiry. Anthropic refreshes its cache free every time content is used, so a steady trickle keeps a 5-minute entry alive indefinitely. A Gemini explicit cache has a fixed TTL that reads do not extend.

The premium is real money when the read never comes. On GPT-6.2 Sol at 30 minutes, a workload that writes before every request pays $0.12 per request instead of $0.096 — a 25 percent penalty on the largest line of the invoice. That is the shape of a support inbox where messages arrive every 45 minutes: each one finds an empty cache, rewrites the prefix, and leaves.

Inside a batch the penalty compounds, because the discount and the write premium pull in opposite directions. The 12-hour write on GPT-6.2 Sol is $2.50 per million tokens in a batch, against $1.00 for batch input — 2.5 times the rate you thought you were paying, and 25 percent above the standard uncached price.

On GPT-5.6 and later the minimum cacheable prefix is 1,024 visible tokens, hidden system content excluded. Each request can create up to four cache writes, so a prompt can carry breakpoints for content that changes at different rates; explicit-only mode writes nothing after your last marker, which keeps a changing question from paying the write premium.

Caches live on individual machines, and traffic above 15 requests per minute can overflow to another machine and miss, though GPT-5.6 and later route automatically. On models starting with GPT-6.2, top-level `instructions` are appended after the input and billed uncached even on a hit, so reusable instructions belong in a developer message; `prompt_cache_options.prewarm` prepares a cache without output, and is still a billed write.

Anthropic's minimum is 512 tokens on the current line, including Fable, Mythos, Opus 5.5, Sonnet 5.5 and Haiku 5.5, rising to 1,024 on Sonnet 5 and 4,096 on Opus 4.5, 4.6 and Haiku 4.5. One top-level `cache_control` turns on automatic caching and moves the breakpoint to the last cacheable block as a conversation grows.

The 5-minute default is shorter than it looks: the lifetime runs from the start of the request that writes or reads the entry, not from the end of the response, so a response that streams for four minutes leaves about one minute. The 1-hour write costs twice the input rate, pays back after two reads, and survives a quiet inbox.

Google split caching into two products. Implicit caching runs by default from Gemini 2.5 onward, charges no write or storage fee, and discounts cached input by 95 percent on Gemini 4 and 90 percent on Gemini 3 and 2.5. The minimum prefix is 4,096 tokens on Gemini 4, 3.8 and 3.6 Flash and 3.1 Pro, and nothing guarantees a hit: the TTL is best-effort, up to 24 hours in memory, with Gemini 4 allowed to keep evicted prefixes on encrypted SSD for up to 12 hours.

Explicit caching exists only on Gemini 3 and 2.5 through `generateContent`, defaults to a one-hour TTL and is the only place storage is billed. The 95 percent discount is the best headline in the market; the missing guarantee is its price, and at 45-minute spacing the model below bills every request at full rate.

**Table 1. Six cache modes, and what each one is actually for**

| Mode | Write, per MTok | Read, per MTok | Minimum prefix | Window | Use it when | 
|---|---|---|---|---|---|
| OpenAI GPT-6.2 Sol, 30 min | $2.50 (1.25×) | $0.10 (0.05×) | 1,024 tokens | 30 min, extended by reads | Traffic returns within the half hour | 
| OpenAI GPT-6.2 Sol, 12 h | $5.00 (2.5×) | $0.10 | 1,024 tokens | 12 h from the write | Gaps run to hours and three requests follow | 
| Anthropic Sonnet 5.5, 5 min | $2.50 (1.25×) | $0.10 (0.05×) | 512 tokens | 5 min, refreshed free | Chat turns a few minutes apart | 
| Anthropic Sonnet 5.5, 1 h | $4.00 (2×) | $0.10 | 512 tokens | 1 h, refreshed free | A support inbox with 45-minute gaps | 
| Gemini 4 Neon, implicit | None | $0.15 (0.05×) | 4,096 tokens | Best effort, no promise | You already batch traffic and want free upside | 
| Gemini 3.8 Flash, explicit | $0.75 plus $0.50 per MTok-hour | $0.075 | 4,096 tokens | Fixed TTL, 1 h default | A burst you open and close yourself | 

I priced one workload: a 48,000-token prefix (8,000 tokens of tool schemas, 34,000 of policy documents, 6,000 of examples), 1,200 fresh tokens per request, and 1,000 requests in three shapes. "Steady" is one request a minute. "Sessions" is three bursts a day of 40 requests at 30-second spacing with three hours of silence between them. "Inbox" is one request every 45 minutes, which is what an internal support queue looks like on a quiet week. Only the shared prefix is counted; the fresh tokens and the output are identical in every row.

**Table 2. Prefix cost per 1,000 requests, and the share of the uncached bill**

| Strategy | Uncached | Steady, 60 s | Sessions, 3 h gaps | Inbox, 45 min | What decides it | 
|---|---|---|---|---|---|
| GPT-6.2 Sol, 30 min | $96 | $4.92 (5%) | $7.68 (8%) | $120 (125%) | The cliff is exactly 30 minutes wide | 
| GPT-6.2 Sol, 12 h | $96 | $5.27 (6%) | $6.45 (7%) | $18.68 (19%) | The default once gaps pass half an hour | 
| Sonnet 5.5, 5 min | $96 | $4.92 (5%) | $7.68 (8%) | $120 (125%) | Same economics, a tighter cliff | 
| Sonnet 5.5, 1 h | $96 | $4.99 (5%) | $9.48 (10%) | $4.99 (5%) | The only row that survives the inbox | 
| Gemini 4 Neon, implicit | $144 | $7.34 (5%) | $10.62 (7%) | $144 (100%) | Free writes, but a miss bills full price | 
| Gemini 3.8 Flash, explicit | $36 | $4.56 (13%) | $5.01 (14%) | $31.80 (88%) | Rent is hourly and the TTL does not refresh | 

The 30-minute write is a bargain for steady traffic and a penalty for anything slower than half an hour, with almost nothing in between. The gap between $4.92 and $120 per thousand requests is not a setting you tune but the spacing of your traffic, and most teams have never measured it.

The 12-hour write is what I would default to for a support or document workload: it gives up 7 percent of the saving in steady traffic and turns the inbox from a 25 percent penalty into an 81 percent saving. Anthropic's 1-hour write is the only mode that handles all three shapes, because reads refresh it free. Google's implicit cache is the cheapest headline and the least certain result — the steady and session rows assume every eligible request hits.

Something quieter happens once caching works. With a hit the 48,000-token prefix costs $0.0048 per request, and a 700-token answer at $10 per million costs $0.007. The output is now 46 percent more expensive than the context under it, and no cache or batch discount touches it.

That changes what to optimise next. Before caching, cutting the corpus by a quarter was worth $24 per thousand requests; after caching the same cut is worth $1.20, while trimming 200 output tokens is worth $2.00. A second round of savings comes from moving effort off the prompt and onto the answer.

Pull a week of request timestamps per workload and compute the median and 90th-percentile gap between requests that share a prefix. Hit rate says what the provider did; the gap distribution says what lifetime to buy.

Then order the request from stable to volatile: tools, system instructions, reference documents, examples, conversation history, current question. Anything that changes per request — timestamps, user IDs, retrieval results — belongs after the last breakpoint, where it bills as ordinary input and never attracts a write charge.

If the 90th-percentile gap is under 25 minutes, buy 30 minutes. If it is under 12 hours, buy 12 hours on OpenAI and 1 hour on Anthropic. If it is longer than the window you can buy, switch caching off for that workload and spend the effort on the batch discount instead. The script below does the arithmetic against your own timestamps.

```
# cache_window.py - price each lifetime against a week of request timestamps.
RATES = {  # $ per 1M tokens, read from the providers' pages on 2026-12-05
    "openai-30m":   dict(write=2.50, read=0.10, ttl=1800,  refresh=True),
    "openai-12h":   dict(write=5.00, read=0.10, ttl=43200, refresh=False),
    "anthropic-5m": dict(write=2.50, read=0.10, ttl=300,   refresh=True),
    "anthropic-1h": dict(write=4.00, read=0.10, ttl=3600,  refresh=True),
    "no-cache":     dict(write=2.00, read=2.00, ttl=0,     refresh=False),
}
PREFIX = 48_000

def bill(stamps, rate):
    writes = reads = 0
    expiry = -1.0
    for t in stamps:
        if t <= expiry:
            reads += 1
            if rate["refresh"]:
                expiry = max(expiry, t + rate["ttl"])
        else:
            writes += 1
            expiry = t + rate["ttl"]
    unit = PREFIX / 1e6
    return writes * rate["write"] * unit + reads * rate["read"] * unit

for shape, gap in (("steady", 60), ("inbox", 45 * 60)):
    stamps = [i * gap for i in range(1000)]
    print(shape, {k: round(bill(stamps, v), 2) for k, v in RATES.items()})
```

A hit requires the rendered prefix to match byte for byte. Reordering tools, editing a schema description, adding a timestamp to the system prompt or re-summarising the conversation invalidates everything after the change. Keep tools append-only, disable them with `tool_choice: "none"` rather than removing them, and on GPT-6.2 put reusable instructions in the first developer message.

Implicit caching is the right default for chat. For an agent with a long fixed corpus and a short question, explicit mode is worth the extra line of code, because it keeps the changing suffix out of the write:

```
{"model": "gpt-6.2-sol",
 "prompt_cache_options": {"mode": "explicit", "ttl": "12h"},
 "input": [
   {"role": "developer", "content": [
     {"type": "input_text", "text": "Tool schemas, policy corpus, examples...",
      "prompt_cache_breakpoint": {"mode": "explicit", "ttl": "12h"}}]},
   {"role": "user", "content": "Order 4471 went to the wrong address. What now?"}]}
```

Batch is not a slower cache; it is a different bet, and the two combine well only when the queued requests still share the prefix when the batch runs. If they do, the stacked price is the cheapest on the card; if they do not, the write is a surcharge on a discount.

Then cap the workload's monthly input spend and alert when writes outnumber reads over a rolling day. That pattern means the wrong lifetime or an unstable prefix, and both are cheaper to fix than to keep paying for. Four numbers run the whole ledger — prefix tokens, cached tokens, write tokens and read tokens. OpenAI reports cached tokens in response usage, Anthropic splits `cache_creation_input_tokens` from `cache_read_input_tokens` and reports zero in both when a prompt was too short to cache, and Gemini reports `cachedContentTokenCount`.

All three providers halve their rates inside a batch, cache columns included — the cheapest per-token price in the market, at $0.05 per million cached input tokens on GPT-6.2 Sol. The trap is that the write is halved rather than removed, so a batch that writes and never reads pays a premium on a discount.

**Table 3. Stacked batch and cache rates on GPT-6.2 Sol and Sonnet 5.5, per 1M tokens**

| Batch mode | Batch input | Cache write | Cached read | A write never read | What to do | 
|---|---|---|---|---|---|
| GPT-6.2 Sol, 30 min | $1.00 | $1.25 | $0.05 | $1.25 (1.25× batch input) | Only if the queue reuses the prefix within 30 minutes | 
| GPT-6.2 Sol, 12 h | $1.00 | $2.50 | $0.05 | $2.50 (2.5× batch input, 25% over standard) | Never switch this on by default | 
| Sonnet 5.5, 5 min | $1.00 | $1.25 | $0.05 | $1.25 (1.25×) | Safe for a steady stream of submissions | 
| Sonnet 5.5, 1 h | $1.00 | $2.00 | $0.05 | $2.00 (2×) | Only for batches that run longer than an hour | 
| Gemini 3.8 Flash, explicit | $0.375 | Storage rent only | $0.0375 listed | $0.50 per MTok-hour | Budget the higher read rate until Google reconciles its pages | 

Anthropic says the quiet part out loud: pre-warming with `max_tokens: 0` is not supported inside a batch, because an entry written during batch processing would probably expire before the follow-up request runs. It also puts batch cache-hit rates at 30 to 98 percent, a reminder that the stacked price is a ceiling on savings, not a promise.

Google's pages disagree with each other. The pricing page lists batch cached input on Gemini 3.8 Flash at $0.0375, while the Batch API guide says a cache hit in a batch bills at "the standard context caching rates", which would be $0.075. At a 48,000-token prefix and 1,000 requests that is $1.80 — small in a pilot, real at scale. Budget the higher number and treat the lower one as upside.

`tool_choice` instead of removing them.`cache_control`.
For your own token counts, the [free AI and cloud cost calculators](https://www.vervebrief.com/p/free-ai-cloud-cost-calculators-gpu.html) have a cache tab that takes a prefix size and a request interval and returns the four lifetimes side by side. The [playbook](https://www.vervebrief.com/playbook) collects the rate cards and decision tables from this series, the [$39 master bundle](https://bgvortex6.gumroad.com/l/ai-infra-master-bundle) adds the spreadsheets and scripts, and the [$19 guardrails kit](https://bgvortex6.gumroad.com/l/llm-infra-guardrails-kit) ships the spend-cap script for step seven. [Signal & Silicon on Substack](https://signalsilicon.substack.com) sends the short version by email once a week.

Prices checked: 2026-12-05. All rates are the providers' published US list prices for standard and batch processing, per million tokens, read from the pages below on that date. Cost tables and figures are my arithmetic on those rates, using a 48,000-token prefix and 1,000 requests.

`instructions` billing on GPT-6.2.
*Cross-posted from [Signal & Silicon](https://www.vervebrief.com/2026/12/the-write-is-bet-prompt-caching-and.html), where the post carries its source notes and every rate table. Prices checked 2026-12-05.*

*More on the same arithmetic: [free AI and cloud cost calculators](https://www.vervebrief.com/p/free-ai-cloud-cost-calculators-gpu.html) · [the playbook](https://www.vervebrief.com/playbook) · [Signal & Silicon on Substack](https://signalsilicon.substack.com).*
