dotsfeed
← Updates

Model

Building an always-on agent on the OpenAI API? The new 12-hour prompt cache costs 2x more to write, so use it only on context you reuse all day

Verified· Oct 20, 2026Published Oct 20, 2026

OpenAI's API now keeps a cached prompt prefix for 12 hours instead of 30 minutes. Writes cost 2.5x normal input versus 1.25x, reads cost the same, so it only pays off for stable instructions reused several times a day with long gaps.

Benchmarks

Benchmarks not published by the source yet.

What changed

On Oct 20, OpenAI Developers announced that the API now offers a 12-hour prompt cache. Until now, a cached prompt prefix on GPT-5.6 and later models was only guaranteed for 30 minutes. OpenAI pitched the new option at persistent agents, like dots, that come back to the same instructions, tools, and context several times a day with long gaps in between.

OpenAI's prompt caching guide spells out the trade. In the Responses API you set prompt_cache_options.ttl to "12h" (the default stays "30m"). Writing a prefix into the 12-hour cache costs 2.5 times the normal input rate, compared with 1.25 times for the 30-minute cache. Reading it back costs the same either way: 0.1 times the normal input rate on most of these models, and 0.05 times on GPT-6.1 Sol. You can also mix both in one request, putting a 12-hour breakpoint after your stable instructions and a 30-minute one after newer conversation content.

Who is affected

Developers building agents or apps on the OpenAI Responses API with GPT-5.6 or later models, especially anything that runs on a schedule or wakes up a few times a day with the same long system prompt and tool list. This is an API setting. It doesn't change anything for people using dots, ChatGPT, or Codex in the apps.

What to do now

  • Count how often a long, stable prefix gets reused with more than 30 minutes between calls. Using OpenAI's rates, a prefix reused three times in a day with long gaps costs about 3.75 times its normal input price on the 30-minute cache (it gets rewritten each time) versus about 2.7 times on the 12-hour cache. At only two uses, the two come out roughly even, so 12h isn't worth it.
  • Put the 12-hour breakpoint only on content that really stays the same all day, such as instructions, tool definitions, and reference material. Leave the changing conversation on the 30-minute default so you don't pay the higher write rate on text that won't be reused.
  • Keep that prefix byte-for-byte stable. Timestamps or user-specific details near the top break the match and force a fresh write.
  • Check cache_write_tokens_details in the usage response, which splits writes into ttl_30m_tokens and ttl_12h_tokens, and compare your real cost before and after the change.

What is not confirmed

OpenAI's guide says 12 hours is a minimum lifetime for read pricing, not a promise that every request lands on a cache hit or gets faster. Entries in the 30-minute cache can also live longer than 30 minutes, so your real savings from switching may be smaller than the math above. The break-even figures are DotsFeed's own arithmetic from OpenAI's published rates, not a test we ran. OpenAI didn't say whether dots themselves already use this setting behind the scenes.

Sources

Sources

Get updates like this every morning

  1. ① Email
  2. ② Card on Stripe
  3. ③ 7 days free

Then $2/month · cancel anytime in one click

Building an always-on agent on the OpenAI API? The new 12-hour prompt cache costs 2x more to write, so use it only on context you reuse all day · Dotsfeed