← All posts

OpenAI 12-hour prompt caching: how to use it, what it costs

2026-10-21 · 4 min read

OpenAI's 12-hour prompt caching lets the Responses API keep your repeated instructions, tool definitions and reference context cached for at least 12 hours instead of 30 minutes. You turn it on with one setting, prompt_cache_options.ttl: "12h". The first write costs double what the 30-minute version costs, and every read after that is billed at a tenth of the normal input price.

@OpenAIDevs announced it Tuesday: "You can now choose 12-hour prompt caching in the API." The example they gave was persistent agents like dots, which reuse the same context all day. The account says you pay the lower cached-input rate "even when requests are hours apart." A second post in the thread, from @OpenAIDevs, adds that you can mix both lifetimes in one request: "12h for shared instructions, 30 minutes for newer conversation content."

Why the 30-minute limit was a problem

Caching only pays off when the next request arrives before the cache expires. A chatbot in an active conversation hits that window easily. An agent that checks a mailbox every hour, or one that wakes up when a form comes in, does not. Under the old default, each of those visits paid full price to re-read the same 20 pages of instructions. The 12-hour option is aimed squarely at that kind of agent. We covered the always-on version of the problem in OpenAI's dots post and in AI agents becoming cron jobs.

What it costs

From OpenAI's prompt caching guide, as multiples of the model's normal input price:

Cache lifetime Write Read
30 minutes (default) 1.25x 0.1x (0.05x on GPT-6.1 Sol)
12 hours 2.5x 0.1x (0.05x on GPT-6.1 Sol)

Reads cost the same either way, so the only extra cost is the bigger first write. My own arithmetic, assuming every request hits the cache: say an agent reuses the same instructions ten times in a day with more than 30 minutes between visits. On the 30-minute setting, each visit pays the 1.25x write again, about 12.5 units in total. On the 12-hour setting you pay 2.5 once plus nine reads at 0.1, about 3.4 units. By the third spaced-out visit the longer cache is already ahead. If your requests already come in minutes apart, stay on the default.

How to use it

  1. Use the Responses API with GPT-5.6 or a later model. Older models use the separate prompt_cache_retention setting, which this change doesn't touch.
  2. Put the stable material first: system instructions, tool definitions, policy documents. The cache matches on the shared start of the prompt, and the prompt has to be at least 1,024 tokens to qualify.
  3. Set the lifetime for the whole request with "prompt_cache_options": { "ttl": "12h" }.
  4. To mix lifetimes, keep the request default at 30 minutes and mark the shared block with "prompt_cache_breakpoint": { "mode": "explicit", "ttl": "12h" }. OpenAI's guide has the full example.
  5. Check that it works. The response's usage.input_tokens_details reports cached_tokens for billed reads and splits writes into ttl_30m_tokens and ttl_12h_tokens.

Two warnings from the docs. The 12-hour lifetime makes a request eligible for the cached price, but it doesn't guarantee a hit, because cache entries live on individual machines and traffic routing can miss them. And "12h" is a minimum, not a deletion deadline. If you cache client documents, assume they may stay stored longer than 12 hours.

Codex and Work go further

Codex lead @thsottiaux posted the same evening that logged-in users in Codex and Work get a cache "forever," with no penalty for coming back to an old conversation. That's a claim about OpenAI's own apps, not the API, and the docs don't mention it. Treat it as a product promise for now.

My read

On paper this is a small pricing tweak. I think it says more than that about where OpenAI expects its API revenue to come from. Anthropic went the same direction in September when it cut cache reads on Claude Fable 5.1 by 75%. Both companies now price for agents that return to the same instructions all day. The per-token list price tells you less about your bill than how much of each prompt gets re-read at the discount.

If you run your own automations, the fix costs almost nothing: keep one fixed block of instructions at the top of every prompt and set the lifetime to 12 hours. If a vendor runs agents for you, ask whether they use long caching and whether the savings show up on your invoice.

If you'd like to find which of your daily workflows re-read the same material and could run for a fraction of the cost, New Face Design's free process audit maps that out with you.

08 / Start here

Which of this can you use today?

Tell us what you use today and we'll reply within one business day with what it would take. Free, 20 minutes, no pitch deck.

Email

pgorski@newfacedesign.com

Phone

+1 (773) 627-2176

Based in

Chicago area

Working with clients everywhere

Skip the form: grab a 20 minute slot.

Open the calendar →