OpenAI's API can now keep your prompt cache for 12 hours
In the Responses API you can now ask for a 12-hour minimum cache lifetime instead of the default 30 minutes, so shared instructions, tools and reference context stay cached even when requests are hours apart. OpenAI's docs say a 12-hour cache write costs 2.5x the normal input rate (30-minute writes cost 1.25x), while cached reads stay at 0.1x input on most GPT-5.6-and-later models and 0.05x on GPT-6.1 Sol. You set it with prompt_cache_options.ttl = "12h".
Why it matters
Agents that wake up every hour or two, like daily assistants and schedulers, kept losing their cache. Now the cheap cached rate can last a whole working day.
Who it's for
Developers running long-lived agents or batch jobs on the OpenAI API with a big, stable system prompt.
How to try it
- Put your stable instructions, tools and reference docs at the start of the prompt.
- Add "prompt_cache_options": {"ttl": "12h"} to your Responses API request.
- Choose 12 hours when you first write the prefix: upgrading an existing 30-minute entry is charged as a fresh write.
- Check cached-token counts in the usage data to confirm the savings.
Plan & availability: OpenAI API, Responses API only, GPT-5.6 and later models. Live since Oct 20, 2026. Older models keep the separate prompt_cache_retention setting.
Source: @OpenAIDevs on X
Written by Emily Carter from the original post. Checked Oct 21, 2026. Features, plans and availability can change, so confirm on the source before you rely on it.
apiprompt-cachingcostagents
More ChatGPT tricks
- Codex Cloud can now drive a browser and desktop, so it tests the app it builds · Dec 1
- Copilot team customizations are GA, so stop setting up the same plugins one by one · Nov 23
- VS Code 1.146 deprecates the Local harness, so migrate your Copilot sessions before February · Nov 23
- GPT-Live-1.1 is in the API, and idle voice sessions now cost $0.02 a minute · Nov 21