The OpenAI 12-hour prompt cache lets your API requests reuse the same cached prompt for at least 12 hours, up from the 30-minute default. Writing to it costs 2.5x the normal input rate, so it only saves money if you reuse that prompt at least three times.
Here is the short version before the details.
- OpenAI announced the longer cache on October 20, 2026, aimed at long-running agents.
- You opt in per request with
prompt_cache_options.ttlset to"12h". - Cache writes cost 2.5x the uncached input rate, versus 1.25x for the 30-minute option.
- Cache reads cost 0.1x on most models and 0.05x on GPT-6.1 Sol.
- Your prompt needs at least 1,024 visible input tokens to be cached.
Those numbers come from OpenAI’s prompt caching guide, and the docs list the 12-hour option for GPT-5.6 and later models.
How the OpenAI 12-hour prompt cache works
Prompt caching stores the unchanging front part of your request, like system instructions and tool definitions. When a later request starts with the same text, you pay a much lower rate to read it back instead of paying full price again.
Until now, the Responses API kept that stored prefix for about 30 minutes by default. That is fine for a busy chatbot. It is a poor fit for an agent that wakes up every hour, because the cache has expired by the time the next request arrives.
The new option stretches the minimum lifetime to 12 hours. As RuntimeWire reported, it targets persistent agents that return to the same instructions and tools across a workday. OpenAI says the entry may live longer than 12 hours, but 12 is the guaranteed minimum.
One note on pricing language: a news report described the new tier as twice the write rate of the 30-minute one. That matches the docs, since 2.5x is exactly double 1.25x. Both numbers are total write rates, not extra fees stacked on top of normal input pricing.
The math: when 12 hours beats 30 minutes
The higher write price is the whole trade-off. You pay more once, then read cheaply for the rest of the day.
The table below is my own arithmetic, not an OpenAI figure. It shows the cost of your cached prompt prefix in multiples of its normal uncached price. It assumes each gap between requests is longer than 30 minutes, and it uses the 0.1x read rate.
| Requests in 12 hours | No caching | 30-minute cache | 12-hour cache |
|---|---|---|---|
| 2 requests | 2.0x | 2.5x | 2.6x |
| 3 requests | 3.0x | 3.75x | 2.7x |
| 12 requests (one per hour) | 12.0x | 15.0x | 3.6x |
Two things stand out. With spaced-out requests, the 30-minute cache can cost more than no caching at all, because every request pays the 1.25x write again. And the 12-hour option only wins from the third request onward.
On GPT-6.1 Sol, the 0.05x read rate makes the hourly case cheaper still, at roughly 3.05x. If you are watching Sol costs, our look at GPT-6.1 Sol’s COBOL migration results shows what the model is good at, so you can judge whether the spend is worth it.
If your agent sends a request every few minutes, the default 30-minute cache probably stays warm on its own, and paying 2.5x to write is wasted money. Pricing trade-offs like this are becoming common, as with Claude Opus 5.5’s fast mode, where speed costs double.
How to turn on the 12-hour cache
In the Responses API, set prompt_cache_options.ttl to "12h". Leaving it out keeps the default of "30m".
You can also set prompt_cache_breakpoint.ttl on a single explicit breakpoint. That lets you keep a huge, stable tool list on the long cache while a smaller, shifting section uses the cheap short one. Any other value returns a 400 error.
Keep the stable content first in your prompt and the changing content last. The cache matches from the start of the request, so one edited line near the top breaks the match for everything after it.
What the 12 hours does not promise
A cache hit is not a guarantee of faster responses. OpenAI’s docs say a hit doesn’t ensure lower latency, or that stored tensors are reused every time.
It also doesn’t change data retention. The docs say the setting does not set a deletion deadline or alter the maximum retention policy, so check your organization’s rules before you pick a value. If you want a refresher on why agent behavior matters for safety, see our piece on OpenAI’s rogue agent incidents.
Finally, the older prompt_cache_retention setting still exists for earlier models and is separate from the new one. GPT-5.5 and GPT-5.5 Pro support only "24h", with no cache-write charge.
Frequently Asked Questions
How long does the OpenAI 12-hour prompt cache last?
It lasts at least 12 hours, and OpenAI may keep entries longer. The default is 30 minutes.
How much does the 12-hour prompt cache cost?
Writing costs 2.5x the normal input rate, and reading costs 0.1x on most models or 0.05x on GPT-6.1 Sol. Reads cost the same whichever lifetime you choose.
Which models support the 12-hour cache?
OpenAI’s guide lists GPT-5.6 and later. Older models use the separate prompt_cache_retention setting.
Is the 12-hour cache worth it for a chatbot?
Usually not. A busy chatbot refreshes the 30-minute cache constantly, so the extra write cost buys you little.
Should you switch?
Turn it on only for agents that return to the same big prompt a few times a day with long gaps between runs. For everything else, leave the 30-minute default alone and check your usage logs first. The savings are real, but only if you actually come back to the prompt.


Leave a Reply