Blog Network

OpenAI · 2026-10-20 · notable

OpenAI adds 12-hour prompt caching — for agents that pause between turns

OpenAI's Responses API can now keep a prompt cache alive for 12 hours instead of 30 minutes, set with prompt_cache_options.ttl on GPT-5.6 and later. The longer lifetime costs 2.5x the input rate to write, against 1.25x for 30 minutes.

OpenAI developer docs card for the prompt caching guide

A 12-hour cache lifetime means an agent that sits idle for hours still gets cached-input pricing on its next turn.

What is it?

OpenAI's prompt caching now offers a 12-hour minimum lifetime alongside the 30-minute default. The option is set with prompt_cache_options.ttl, which takes "30m" or "12h", applies to GPT-5.6 and later, and works only in the Responses API. Older models keep using the separate prompt_cache_retention parameter, which the new setting does not change.

How does it work?

Caching reuses the shared head of a prompt — instructions, tool definitions and long context — so repeat requests skip re-processing it. Writing a 12-hour cache entry costs 2.5x the uncached input-token rate, against 1.25x for the 30-minute lifetime, while cached reads cost the same either way: 0.1x the ordinary input rate on most GPT-5.6-and-later models and 0.05x on GPT-6.1 Sol. The minimum cacheable prompt is 1,024 tokens on GPT-5.6 and later.

Why does it matter?

A long-running agent often goes quiet for hours between turns — waiting on a human, a CI run or a scheduled job — and under a 30-minute lifetime its system prompt and tool list had to be paid for again at full price on every wake-up. Choosing "12h" trades a higher one-time write cost for cached reads across a whole working day, so the saving grows with how often the agent comes back.

Who is it for?

developers running persistent or scheduled agents on the Responses API

Try it

prompt_cache_options: { ttl: "12h" }

Sources

Tags

  • openai
  • prompt-caching
  • responses-api
  • agents
  • api
  • pricing
  • gpt-6-1-sol

← All releases