Developer toolsNotable

OpenAI adds a 12-hour prompt cache to the Responses API, at twice the write price

A new ttl option keeps cached prefixes eligible for discounted reads for at least 12 hours instead of 30 minutes. Writes cost 2.5x the input price, so it only pays off when the same prefix is reused across long gaps.

Promptea Editorial4 min read

OpenAI added a longer prompt cache to its API on October 20. According to the API changelog, developers using the Responses API can now ask for 12-hour prompt caching, so that shared instructions, tool definitions and context stay eligible for cached-input pricing even when requests arrive hours apart. The trade-off is stated in the same entry: a 12-hour cache write costs 2.5x the input token price.

What actually changed

Per OpenAI's prompt caching guide, models from GPT-5.6 onward accept a request-level setting, prompt_cache_options.ttl, with two values: "30m", the default, and the new "12h". A per-breakpoint ttl can override the request-level value, and anything else returns a 400 error. The 12-hour option exists only in the Responses API; the guide says the Agents API shares the Responses API's caching behavior.

Two details in the guide matter for anyone planning around it. First, the ttl is a minimum, not an expiry: it governs how long an entry stays eligible for cache-read pricing, and OpenAI may keep entries longer. Second, "12h" does not set a deletion deadline and does not change OpenAI's maximum data-retention policy, so it is a pricing and availability control rather than a storage commitment.

Older models are unaffected. They keep the existing prompt_cache_retention parameter (in_memory or 24h, with GPT-5.5 and GPT-5.5 Pro accepting only 24h), and the new settings do not change it.

The pricing, in multipliers

The guide expresses everything relative to the ordinary uncached input rate for each model:

  • 30-minute cache write (GPT-5.6 and later): 1.25x
  • 12-hour cache write (GPT-5.6 and later, Responses API only): 2.5x
  • Cache read, most GPT-5.6+ models: 0.1x
  • Cache read, GPT-6.1 Sol: 0.05x
  • Earlier models: no extra write charge; reads at each model's cached-input rate

OpenAI notes that write rates are totals, not surcharges added on top of normal input. The minimum cacheable prompt for GPT-5.6 and later is 1,024 tokens, and the usage object now separates write tokens by lifetime (ttl_30m_tokens and ttl_12h_tokens), which makes it possible to audit what the longer cache is costing.

When it pays off

The guide's own advice is to compare the higher 12-hour write rate with the cost of rewriting the prefix after 30-minute coverage lapses. A rough Promptea calculation shows where the line falls. Take one large prefix reused by several requests, each arriving after a 30-minute entry would have stopped qualifying. With the default cache, each request pays a fresh 1.25x write. With the 12-hour cache, the first request pays 2.5x and later ones read at 0.1x.

  • Two requests: about 2.5x of the prefix price with the default cache versus 2.6x with 12 hours, so the longer cache loses slightly.
  • Three requests: 3.75x versus 2.7x, so the longer cache wins.
  • Ten requests within 12 hours: 12.5x versus 3.4x.

This is a simplified model. It assumes every 30-minute entry is gone before the next call, and OpenAI says entries can survive past their minimum, so real savings depend on measured hit rates. If requests already arrive every few minutes, the default cache covers them and the 12-hour write is pure overhead.

What it means for prompts and agents

The feature is aimed at long-running and intermittent workloads: a coding agent whose system prompt and tool schemas are reused across a workday, a support assistant with a large policy document consulted every hour or two, or batch-like jobs triggered on a schedule. For those, the cost of a long, detailed system prompt drops after the first call of the day, which weakens the usual incentive to trim instructions purely to save tokens.

It also raises the value of prompt structure. Caching works on prefixes, so stable material (instructions, tool definitions, reference text) has to come first and stay byte-identical between calls, with anything variable such as user input, timestamps or retrieved snippets placed after it. A prompt that puts the date at the top will miss the cache whatever ttl is set. In explicit mode, the guide says only developer-marked breakpoints are cached, with up to four cache writes per request, and a request with no breakpoints creates no cache writes at all.

Independent measurements of hit rates or real-world savings were not available at publication. The multipliers above come from OpenAI's documentation; the break-even figures are Promptea's arithmetic on those multipliers.

Why this matters

  • For agents and apps that reuse a large, stable prefix across gaps longer than 30 minutes, input costs on repeat calls can fall to a tenth of the normal rate or lower.
  • Because writes cost 2.5x, enabling it everywhere can raise bills; the decision depends on how often a prefix is actually reused within 12 hours.
  • It rewards prompts built with stable content first and variable content last, which is a structural choice developers control.

Key takeaways

  • New "12h" value for prompt_cache_options.ttl in the Responses API, GPT-5.6 and later; "30m" remains the default.
  • 12-hour cache writes cost 2.5x input versus 1.25x for 30-minute writes; reads are 0.1x (0.05x on GPT-6.1 Sol).
  • The ttl is a minimum for cache-read pricing eligibility, not a guaranteed expiry or a change to data retention.
  • On Promptea's simplified math, the longer cache starts winning from the third reuse of a prefix whose 30-minute entry would have lapsed.

Sources

  1. OpenAIPrimary
    API changelog: 12-hour prompt caching (Oct 20, 2026)
    developers.openai.com
  2. OpenAIPrimary
    Prompt caching guide
    developers.openai.com
Tags:
  • prompt caching
  • API cost
  • Responses API
  • agents
  • context
Companies:
  • OpenAI
Models:
  • GPT-5.6
  • GPT-6.1 Sol
OpenAI adds 12-hour prompt caching to the Responses API · Promptea