A cache that expires after half an hour can miss the way business software actually runs. OpenAI is now giving developers a 12-hour window, allowing applications to reuse lengthy instructions and context even when requests arrive hours apart.
The option could reduce input costs and response latency for intermittent AI workloads. It also comes with a substantially higher upfront write price, making actual reuse patterns more important than the length of the cache alone.
The Responses API Can Now Preserve Context for 12 Hours
OpenAI added the feature to its API changelog on October 20. Developers using supported models through the Responses API can set prompt_cache_options.ttl to "12h" instead of relying on the default 30-minute lifetime.
The setting is available for GPT-5.6 and later supported models. OpenAI describes it as a minimum lifetime, meaning an eligible cached prefix can remain available for discounted reuse for at least 12 hours.
Prompt caching avoids repeatedly processing the unchanged beginning of a request. That reusable prefix can include developer instructions, tool definitions, conversation history, documents, images and other supported content.
A customer-service application, for example, might send the same service policies, escalation rules and tool schemas with every request. An agent handling campaign operations might repeatedly receive the same brand guidelines, approval rules and analytics definitions.
Only the changing portion of the request needs to be processed normally when the earlier prefix produces a cache hit.
There is a threshold. OpenAI’s current prompt caching documentation says GPT-5.6 and later require a cacheable prefix of at least 1,024 tokens. Shorter instructions will not qualify simply because a longer lifetime has been selected.
The Longer Prompt Cache Costs More to Write
The 12-hour option is not a free extension.
For GPT-5.6 and later, the default 30-minute cache write costs 1.25 times the model’s ordinary input-token rate. A 12-hour write costs 2.5 times that rate. These are total write prices, not surcharges added to the regular input charge.
Reads remain considerably cheaper. OpenAI says cached-prefix reads cost 0.1 times the ordinary input rate on most supported models and 0.05 times the ordinary rate on GPT-6.1 Sol, regardless of whether the cache was written for 30 minutes or 12 hours.
That creates a straightforward trade-off. A longer write costs more at the beginning but can prevent the application from rebuilding the same cache as requests return throughout the day.
Using the rate for most supported models, a fully reused prefix written once for 12 hours and read twice would cost the equivalent of 2.7 ordinary input passes: 2.5 for the write and 0.1 for each read. Processing that prefix normally three times would cost three ordinary input passes.
That illustrative calculation excludes output tokens, changing content and cache misses. Still, it shows why the feature is aimed at recurring workloads rather than one-off requests. A prefix written at the 12-hour rate but reused only once would cost more than processing it normally twice.
Stable Prompt Prefixes Decide Whether the Savings Appear
A longer lifetime cannot rescue a frequently changing prompt.
Cache reuse depends on the rendered prefix matching. Changes to tool definitions, their ordering, developer messages, output schemas, reasoning settings or earlier conversation content can prevent part of the request from matching an existing entry.
Developers can use implicit caching and let OpenAI select eligible breakpoints. They can also place explicit breakpoints after stable content, keeping frequently changing instructions and user-specific information outside the cached portion.
The two lifetimes can coexist in one request. Shared reference material used throughout the day can receive a 12-hour breakpoint, while session-specific context can retain the 30-minute default. Content placed after the last explicit breakpoint can be processed without incurring a cache-write charge.
That separation matters for applications with a large but predictable foundation. Brand rules, product classifications, tool schemas and evaluation rubrics may remain fixed, while campaign data, customer questions and timestamps change continuously.
OpenAI cautions that upgrading content already covered by a 30-minute entry to a 12-hour lifetime creates a new 12-hour write charge. The earlier write is not credited against it. Choosing the intended lifetime when the stable prefix is first written may therefore affect the final cost.
AI Agents Gain a Cache Window That Better Fits Business Activity
The feature is particularly relevant to AI agents that use long instructions and extensive tool definitions but do not receive evenly spaced requests.
An internal marketing agent might analyze several campaigns in the morning, sit idle during approvals and resume later in the afternoon. A content-review system could use the same editorial rules across submissions arriving sporadically from different team members. An ecommerce assistant may rely on a stable product taxonomy while individual customer interactions remain unpredictable.
Under the 30-minute default, those gaps can push later requests outside the minimum cache window. The 12-hour option gives the shared foundation a better chance of remaining eligible across a working day.
For marketers and operations teams, the practical task is to identify which instructions are genuinely stable before selecting the longer lifetime. Teams should place reusable policies, examples and tool definitions early in the prompt, isolate volatile information later, and compare cache writes with successful reads. The higher write rate makes measurement essential; enabling the option across every request could raise costs when reuse is weak.
OpenAI provides a Prompt Caching Dashboard for monitoring cache-hit rates, reads per write and the distribution of cached, written and uncached tokens. Its diagnostic tool can also help identify why an expected prefix did not match.
Twelve Hours Is a Minimum, Not a Deletion Deadline
The new setting describes how long the cache remains eligible for reuse at minimum. It does not require OpenAI to delete the entry at the 12-hour mark, and it does not alter the platform’s maximum data-retention policy.
OpenAI says the cache stores computed key-value states rather than the prompt tokens themselves. Cached states are isolated by organization and cannot be reused across regional processing boundaries.
A selected lifetime also does not guarantee that every later request will achieve a cache hit or lower latency. Requests still need a matching prefix and must reach infrastructure holding an eligible cached entry. Capacity and routing can affect reuse.
Developers can audit the outcome through the response usage data. OpenAI reports 30-minute and 12-hour writes separately as ttl_30m_tokens and ttl_12h_tokens, alongside cached and ordinary input tokens. Those fields provide the billing evidence needed to determine whether the longer window is paying for itself.


