The October 20 addition is a minimum cache lifetime on the Responses API. It is not a deletion clock. Omit prompt_cache_options.ttl and the value is 30m, billed at 1.25× the ordinary input price. Set it to 12h and the write is billed at 2.5×. Those multipliers are the whole write price, not a surcharge on top of ordinary input. Reads are the same for both lifetimes: 0.1× on most GPT-5.6 and later models, and 0.05× on GPT-6.1 Sol. The bill is cached_tokens, ttl_30m_tokens, and ttl_12h_tokens. cache_write_tokens is already the sum of the last two. Do not add it again.
This piece is written for 21 October 2026, from the API changelog of the day before and the prompt-caching guide still on the developer site. The changelog tags the feature as v1/responses. Yesterday we wrote about which field holds the M3.1 Flash answer. Same habit here: read the fields, not a sentence that says the cache hit.
What October 20 actually added
The changelog says you can now choose 12-hour prompt caching in the API, so shared instructions, tools, and context stay at the cached-input price even when requests are hours apart. The guide puts the switch on prompt_cache_options.ttl in the Responses API, for GPT-5.6 and later.
| ttl | Minimum lifetime | Write rate | What the guide says it is for |
|---|---|---|---|
30m, the default when omitted | 30 minutes | 1.25× ordinary input | Conversations and agent steps that reuse context often |
12h | 12 hours | 2.5× ordinary input | Instructions and reference material reused across longer gaps |
OpenAI may keep an entry longer than the minimum you asked for. 12h does not set a deletion time, and it does not change the maximum data-retention policy. It also does not promise that the next request reuses the stored KV tensors, or that latency drops. Unsupported values return 400 invalid_request_error. This setting does not change prompt_cache_retention on older models. In the guide’s comparison table, GPT-5.5 uses 24h only, and it has no extra cache-write charge.
Which API accepts 12h
The comparison table writes the 12-hour value as available in the Responses API. The request-level ttl applies to the implicit breakpoint and to explicit breakpoints that do not set their own ttl. One explicit breakpoint overrides it with prompt_cache_breakpoint.ttl. Omit both and the lifetime is 30m.
The Chat Completions create reference still lists prompt_cache_options.ttl as accepting only 30m for now. The caching guide does not offer 12h on chat/completions. Model calls on the Agents API follow the same caching behavior as the Responses API, and the October 20 changelog names v1/responses.
One request can write at most four breakpoints. Implicit mode uses one of those slots, leaving three for explicit breakpoints. With mode set to explicit and no explicit breakpoint, the request does not use prompt caching. On GPT-5.6 and later, a cacheable prefix needs at least 1,024 visible input tokens. Hidden OpenAI content does not count toward that minimum. Earlier models round reported cached_tokens down to a multiple of 128. GPT-5.6 and later report the exact eligible boundary, excluding hidden tokens.
How two lifetimes bill inside one request
A breakpoint covers the entire prefix before it. Inside one request, each token is billed once, at the longest lifetime among the selected writes that cover it. A later 12-hour write also gives earlier selected breakpoints inside that prefix 12-hour coverage. The guide’s four rows are:
| Cache before the request | Breakpoints selected | Reads | 30-minute writes | 12-hour writes |
|---|---|---|---|---|
| None | 12h at 2,000, then 30m at 5,000 | 0 | 3,000 | 2,000 |
| None | 30m at 2,000, then 12h at 5,000 | 0 | 0 | 5,000 |
| Valid 30-minute coverage through 2,000 | 12h at 5,000 | 0 | 0 | 5,000 |
| Valid 12-hour coverage through 2,000 | 30m at 5,000 | 2,000 | 3,000 | 0 |
Upgrading valid 30-minute coverage to 12 hours charges a new 12-hour write for those tokens, with no credit for the earlier write. Any portion already inside a valid 12-hour entry stays a read. A 30-minute read refreshes coverage to at least 30 minutes after that read. If the entry already has valid 12-hour coverage, the later of the existing expiry and 30 minutes after the read is kept. The read does not restart a 12-hour clock, and it does not charge another write.
How to add the usage numbers
On Responses models that support prompt_cache_options, writes are split in input_tokens_details.cache_write_tokens_details. ttl_30m_tokens and ttl_12h_tokens do not overlap, and they sum to cache_write_tokens. Both fields come back, and one of them can be zero. cached_tokens counts tokens billed as reads. It excludes tokens billed as writes, including an upgrade from 30 minutes to 12 hours.
{
"usage": {
"input_tokens": 12000,
"input_tokens_details": {
"cached_tokens": 4000,
"cache_write_tokens": 7000,
"cache_write_tokens_details": {
"ttl_30m_tokens": 3000,
"ttl_12h_tokens": 4000
}
}
}
}
Ordinary input is 12000 - 4000 - 7000 = 1000. Input cost is ordinary input times the input price, cached_tokens times the cached-input price, ttl_30m_tokens times 1.25× the input price, and ttl_12h_tokens times 2.5× the input price, then divided by 1,000,000. The guide uses an input price of $1 per million and a cached-input price of $0.10, and that token split costs $0.01515 of input. GPT-6.1 Sol reads at 0.05×, which is not the 0.1× rate in that worked example. The same token counts at a 0.05× read rate are not still $0.01515.
A miss is often a changed prefix
The cache stores KV tensors, not the original tokens. The whole rendered prefix has to match. The guide names settings that change the prefix: model, tools, parallel_tool_calls, text.format (structured outputs add format instructions and the schema you sent), reasoning.effort, text.verbosity, and context_management when it rewrites earlier text. Change the schema, and the prefix stops matching from that change onward.
Cache entries live on individual machines. Traffic above 15 requests per minute can be routed to a machine that does not hold the entry. Caches are not shared across organizations or across regional processing boundaries. On GPT-5.6 and later, OpenAI routes automatically, and prompt_cache_key is no longer there to optimize hits. It can still separate accounting between customers. The migration note says to replace prompt_cache_retention with prompt_cache_options.ttl when moving from an earlier model to GPT-5.6 or later.
Keep this usage record
Keep at least these fields from one call, not only a line that says the cache hit:
{
"api": "responses",
"model": "gpt-6.1-sol",
"request_ttl": "30m",
"input_tokens": 12000,
"cached_tokens": 4000,
"cache_write_tokens": 7000,
"ttl_30m_tokens": 3000,
"ttl_12h_tokens": 4000,
"ordinary_input_tokens": 1000
}
ordinary_input_tokens has to equal input minus reads minus writes. The two ttl fields have to add back to cache_write_tokens. If they do not, an upgrade write was counted as a read, or cache_write_tokens was added a second time.
- JSON Validator — check that the fields are present, then check that the two ttl counts sum.
- JSON Diff — compare two usage objects and see whether the addition is a 12-hour write or ordinary input.
- JSONPath — pull the responses whose
ttl_12h_tokensis above zero.
FAQ
Can Chat Completions set ttl to 12h?
The caching guide puts 12h on the Responses API. The Chat Completions create reference still says ttl currently accepts only 30m. The October 20 changelog names v1/responses.
Does 12h mean the entry is deleted after 12 hours?
No. It is a minimum lifetime. OpenAI may keep the entry longer. It does not set a deletion time, it does not change the maximum retention policy, and it does not promise the next hit or a lower latency.
Is the 2.5× rate an extra fee on top of ordinary input?
No. The guide says it is the total write rate. A token billed as a 12-hour write is not also billed as ordinary input. Ordinary input is input_tokens minus cached_tokens minus cache_write_tokens.
If I already paid a 30-minute write, is that credited when I upgrade to 12 hours?
No. Valid 30-minute coverage upgraded to 12 hours is written again at the 12-hour rate. Tokens already inside a valid 12-hour entry stay reads.
Do I add cache_write_tokens again when I total the bill?
No. It equals ttl_30m_tokens plus ttl_12h_tokens. Multiply those two components by 1.25× and 2.5× the input price. Adding cache_write_tokens on top counts the write twice.
Does cached_tokens above zero mean this call was faster?
The guide says the minimum lifetime decides whether tokens can be billed as reads. It does not promise that every request reuses KV tensors on a machine, or that latency is lower. Traffic above 15 requests per minute can also be routed to a machine that does not hold the entry.
Summary
The October 20 change is a minimum-lifetime choice on the Responses API. A 30-minute write is 1.25×, a 12-hour write is 2.5×, and reads stay at 0.1×, or 0.05× on Sol. The usage object splits writes into two ttl fields. Adding cache_write_tokens on top of those fields doubles the write.
A schema, a tool definition, and the model id all change the prefix. On the record, keep that the API was responses, the ttl you sent, and whether the four usage numbers still satisfy the subtraction.