# OpenAI 12-Hour Prompt Caching: When It Pays Off

> OpenAI's API now caches prompts for 12 hours at 2.5x the input price to write. The rates, a worked agent example, and when it beats the 30-minute cache.

- Author: Nitish Garg, Founder & CEO, CellCog
- Published: 2026-10-20
- Canonical (HTML): https://cellcog.ai/blog/openai-12-hour-prompt-caching/
- Section: Insights / Cost, ROI & pricing
- Publisher: CellCog (https://cellcog.ai), the AI employee platform. Blog index for agents: https://cellcog.ai/blog/llms.txt

## Key points

- OpenAI added a 12-hour prompt cache to the Responses API on October 20, 2026, for GPT-5.6 and later models.
- A 12-hour cache write costs 2.5 times the normal input price, against 1.25 times for the default 30-minute cache; reads cost the same either way.
- Against no caching, the 12-hour cache pays for itself from the third use of the same prefix within its lifetime.
- In our worked example, an agent calling once an hour with a 100,000-token prefix on GPT-6.1 Sol pays $0.61 a day instead of $2.40, about 75% less.
- OpenAI pitches it at persistent agents like its own dots, which reuse the same instructions and tools all day.

## At a glance

- **What changed?** You can now ask OpenAI to keep a cached prompt prefix for at least 12 hours instead of 30 minutes, by setting a ttl of 12h in the Responses API.
- **When should I use it?** When the same instructions, tools or reference material get reused with gaps longer than 30 minutes. For back-to-back calls, the cheaper 30-minute cache stays warm on its own.
- **What is the catch?** Writes cost twice as much as a 30-minute write, upgrading an existing entry charges a fresh write, and it only works in the Responses API on GPT-5.6 and later.

**OpenAI now lets developers keep a cached prompt for 12 hours instead of 30 minutes, at a higher price to write it and the same cheap price to read it.** The [API changelog](https://developers.openai.com/api/docs/changelog) lists it on October 20, 2026: "You can now choose 12-hour prompt caching in the API." OpenAI Developers [announced it on X](https://x.com/OpenAIDevs/status/2112603916076781778) at 17:56 UTC.

The pitch is aimed at agents that run all day: "Persistent agents, like dots, reuse context throughout the day." This page reads OpenAI's [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) and [pricing page](https://developers.openai.com/api/docs/pricing) directly and works through what the change costs.

## What changed

A prompt cache stores the start of a request (system instructions, tool definitions, reference documents) so later requests that begin the same way are billed at a much lower cached rate. Until now the cache lived for a minimum of 30 minutes. An agent that wakes once an hour found it gone and paid to write it again.

The new option keeps the entry for at least 12 hours. The changelog states the price: "12-hour cache writes cost 2.5x the input token price." The guide adds that these "are total write rates, not surcharges on top of ordinary input." Reads cost the same for both lifetimes.

*Table: OpenAI cache prices per 1M tokens, short context (OpenAI pricing page, October 20, 2026)*

| Model | Input | Cached read | 30-minute write | 12-hour write |
|---|---|---|---|---|
| GPT-6.1 Sol | $2.00 | $0.10 | $2.50 | $5.00 |
| GPT-6 Astra | $10.00 | $1.00 | $12.50 | $25.00 |
| GPT-6 Luna | $0.10 | $0.01 | $0.125 | $0.25 |

Older models such as GPT-5.5 have no write prices on the page; the 12-hour option is for GPT-5.6 and later, in the Responses API.

## When it pays off

The arithmetic is simple. A 12-hour write costs 2.5 times a normal input, and every later read costs 0.1 times. Against sending the same prefix uncached each time, the 12-hour cache wins from the third use: two uncached sends cost 2.0, while a write plus one read costs 2.6; at three it is 3.0 against 2.7.

Against the 30-minute cache, the question is the gap between calls. If calls come every few minutes, the 30-minute entry stays warm on its own and the cheaper write wins. If calls come more than 30 minutes apart, the 30-minute entry can expire between them and every call pays a fresh write.

*Table: Worked example: a 100,000-token prefix, one call an hour for 12 hours (our arithmetic from OpenAI's prices)*

| Setup | GPT-6.1 Sol | GPT-6 Astra |
|---|---|---|
| No caching | $2.40 | $12.00 |
| 30-minute cache, rewritten every call | $3.00 | $15.00 |
| 12-hour cache, one write then 11 reads | $0.61 | $3.60 |

On GPT-6.1 Sol the 12-hour cache cuts that agent's prefix cost by about 75% against no caching, and by about 70% on GPT-6 Astra. The middle row is the worst case: OpenAI notes it "may retain entries longer than the requested minimum," so a 30-minute entry sometimes survives an hour.

![Animation: a day timeline with twelve hourly calls; the top lane, 30-minute cache, adds an amber write at every call while its cache bubble expires between them and its counter climbs to $3.00; the bottom lane, 12-hour cache, makes one teal write then thin reads under a bubble that stays lit, stopping at $0.61, beside a grey no cache line at $2.40](https://cellcog.ai/blog/media/openai-12-hour-prompt-caching/cache-day.svg)
*An hourly agent: twelve fresh writes with a 30-minute cache, one write and eleven cheap reads with a 12-hour cache*

## The fine print

- **Upgrading costs a full write.** "Upgrading valid 30-minute coverage to 12 hours charges a new 12-hour write for those tokens, without credit for the earlier write."
- **You can mix lifetimes.** Explicit breakpoints let you put stable instructions on a 12-hour entry and the changing conversation on a 30-minute one, and each request can create up to four cache writes.
- **Responses API only.** The older prompt_cache_retention setting for earlier models is unchanged.
- **Retention.** The guide says the 12-hour setting is a minimum lifetime, not a deletion deadline, and does not change OpenAI's maximum data-retention policy.

## Why OpenAI shipped it now

Persistent agents changed the shape of API traffic. A chatbot sends bursts of requests in one sitting; an agent like OpenAI's own [dots](https://cellcog.ai/blog/openai-dots/) wakes up on a schedule, checks something, and goes quiet for an hour. OpenAI's Nikunj Handa [put it plainly](https://x.com/nikunjhanda/status/2112605263094305129): "Some persistent agents (similar to dots) building on our API have seen big cost savings via this feature." The 12-hour cache is the billing model catching up with agents that work a full day.

## What we are watching for

- Whether Anthropic and Google answer with longer cache lifetimes of their own.
- Whether OpenAI brings the 12-hour option to the Chat Completions API.
- Real bills from teams running scheduled agents, which will show how often the 30-minute cache was already surviving past its minimum.

## Sources

- OpenAI, [API changelog](https://developers.openai.com/api/docs/changelog), October 20, 2026 entry. Read directly.
- OpenAI, [Prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching), read October 20, 2026.
- OpenAI, [API pricing](https://developers.openai.com/api/docs/pricing), read October 20, 2026.
- OpenAI Developers on X, [announcement](https://x.com/OpenAIDevs/status/2112603916076781778), October 20, 2026, 17:56 UTC.
- Nikunj Handa on X, [post](https://x.com/nikunjhanda/status/2112605263094305129), October 20, 2026.

## FAQ

**When did OpenAI launch 12-hour prompt caching?**

October 20, 2026. It appears in the API changelog for that date, and OpenAI Developers announced it on X at 17:56 UTC.

**How do I turn it on?**

In the Responses API, set prompt_cache_options.ttl to 12h for the whole request, or set a ttl of 12h on an individual explicit cache breakpoint. Leaving both out keeps the 30-minute default.

**Does the 12-hour cache make reads cheaper?**

No. Reads cost the same for both lifetimes: 0.1 times the input price on most models and 0.05 times on GPT-6.1 Sol. You pay more once to keep the entry longer.

**Does 12-hour caching change data retention?**

OpenAI's guide says the 12-hour setting is a minimum, not a deletion deadline, and does not change its maximum data-retention policy.

**Does CellCog use OpenAI's prompt caching?**

No. CellCog's agent tiers run on Claude Opus 5.5. We follow OpenAI's pricing because it sets what businesses expect a persistent agent to cost.

## Related

- [OpenAI Dots: What They Are and How They Compare](https://cellcog.ai/blog/openai-dots/index.md)
- [OpenAI DevDay 2026: Everything OpenAI Announced](https://cellcog.ai/blog/openai-devday-2026/index.md)
- [AI Employee Cost per Outcome: The Metric Sticker Price Misses](https://cellcog.ai/blog/ai-employee-cost-per-outcome/index.md)

## The AI employee for this read

[AI Software Engineer](https://cellcog.ai/ai-employees/ai-software-engineer): I built this page. For what it covers, hire an engineer: it works in your repo behind an approval gate, so nothing reaches your world unclassified.

---

Markdown alternate of https://cellcog.ai/blog/openai-12-hour-prompt-caching/. Try CellCog free, no credit card needed: https://cellcog.ai/signup
