OpenAI 12-hour prompt caching: 2.5x writes, do the math
OpenAI's Responses API adds 12-hour prompt caching for agents. Cache writes cost 2.5x input, reads 0.1x. Here's the break-even math before you flip the TTL.
OpenAI just stretched its prompt cache from half an hour to half a day. As of October 20, the Responses API supports 12-hour prompt caching, so an agent that touches the same system prompt and tool definitions a few times a day can still get cached-input pricing. The catch is on the write side: a 12-hour cache write costs 2.5x the normal input rate, double the 30-minute option. That's a good deal for some workloads and a tax on others. The difference is arithmetic.
What actually happened
The OpenAI API changelog entry for October 20 adds 12-hour caching to v1/responses, aimed at persistent agents whose requests arrive hours apart. The prompt caching guide has the details for GPT-5.6 and later:
- Set it with
prompt_cache_options.ttl:"30m"(default) or"12h". You can also setttlon an individualprompt_cache_breakpoint. - Write cost: 1.25x the uncached input rate for 30 minutes, 2.5x for 12 hours. Those are total rates, not surcharges.
- Read cost: 0.1x the input rate regardless of TTL, or 0.05x on GPT-6.1 Sol.
- Minimum: 1,024 visible input tokens before a prompt is cacheable.
- Unsupported values return a
400 invalid_request_error. The TTL is a minimum, not a deletion deadline.
Why 12-hour caching matters for your business
Run the break-even before you change anything. Take a cached prefix and count how often it gets reused when the gaps between requests are longer than 30 minutes. With the 30-minute TTL, every cold request rewrites the cache at 1.25x. With 12 hours you pay 2.5x once, then 0.1x for each reuse.
- Two requests, three hours apart: 30m costs 2.5x (two writes). 12h costs 2.6x. A wash.
- Three requests: 3.75x versus 2.7x. 12h wins.
- Eight requests spread over a workday: 10x versus 3.2x.
If the prefix is used once and abandoned, 12 hours just doubles your write cost.
The workloads that win are the ones that idle. A nightly reconciliation agent, an inbox triage bot that wakes every hour, a sales assistant that a rep opens four times a day. These used to come back cold after a lunch break. Now they don't have to.
Hot loops should stay on 30 minutes. If your agent fires every few seconds, the 30-minute cache never goes cold, and paying 2.5x for a longer TTL gets you nothing.
Prefix discipline still decides everything. The cache matches an exact prefix. A timestamp or a reordered tool list near the top and you pay the write without ever getting the read.
Key takeaways
- OpenAI added 12-hour prompt caching to the Responses API on October 20, 2026
- Set
prompt_cache_options.ttlto"12h"; the default stays"30m" - 12-hour writes cost 2.5x input versus 1.25x for 30 minutes; reads are 0.1x either way
- Break-even is about two reuses after a 30-minute gap; three or more and 12 hours wins
- Use it for agents that idle between runs; keep high-frequency loops on 30 minutes
- A moving token in your prefix wastes the write; keep static content first
Cache settings are a cost decision, so price them like one. We build agent workflows with per-run cost tracking and cache-hit monitoring, so a TTL change shows up as a number, not a guess. Estimate one workflow's cost, or send us the agent that keeps waking up cold.
Sources: OpenAI API changelog, OpenAI prompt caching guide.
- #openai
- #prompt-caching
- #ai-costs
- #ai-agents
- #responses-api
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
Stripe Atlas in MCP: an AI agent can start your company filing
Stripe Atlas now works through the Stripe MCP server, so an AI agent can prep a Delaware LLC or C corp application. Signing, payment, and choices stay with you.
Read itClaude attack surface reduction: 493 issues in 25 OSS projects
Anthropic's Claude found 493 attack surface issues across 25 open-source projects, including OpenSSH. The lesson for your stack: turn off defaults you don't use.
Read it