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

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

- Org: OpenAI
- Date: 2026-10-20
- Category: tool
- Source: https://developers.openai.com/api/docs/changelog
- Canonical page: https://ai-tldr.dev/releases/openai-prompt-caching-12h/

## In short

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.

## What it is

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 it works

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 it matters

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 it's for

developers running persistent or scheduled agents on the Responses API

## Try it

prompt_cache_options: { ttl: "12h" }

## Links

- [API Changelog](https://developers.openai.com/api/docs/changelog)
- [Caching Guide](https://developers.openai.com/api/docs/guides/prompt-caching)
