OpenAI adds 12-hour prompt caching to the Responses API on October 20, 2026: cache writes cost 2.5x input
Set prompt_cache_options.ttl to 12h in the Responses API (GPT-5.6 and later). Cache writes cost 2.5x input; reads stay at the usual rate.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. What you paste stays in this tab. It is never sent to Wirestack or saved.
- OpenAI API keyOPENAI_API_KEYGet key
Click Create new secret key
What you get
On October 20, 2026 OpenAI added 12-hour prompt caching to the Responses API. It keeps shared instructions, tools and context cached longer, so requests hours apart can still get cached-input pricing.
The guide says to set prompt_cache_options.ttl to "12h". The default is "30m". You can also set prompt_cache_breakpoint.ttl on a single breakpoint. It applies to GPT-5.6 and later. Older models use prompt_cache_retention instead.
Cache writes cost 2.5x the uncached input rate. Cache reads cost 0.1x the input rate, or 0.05x for GPT-6.1 Sol, the same for both lifetimes. The minimum prompt is 1,024 visible input tokens.
Prerequisites
- An OpenAI API key in
OPENAI_API_KEY - An app on the Responses API using GPT-5.6 or a later model
- A long, repeated prefix such as system instructions or tool definitions
Steps
- Put stable content (instructions, tools, documents) at the start of the prompt.
- Set
prompt_cache_options.ttlto"12h"as the guide shows. - Check
usage.input_tokens_details.cache_write_tokensandttl_12h_tokensto see writes. - Weigh the 2.5x write cost against how often the prefix is reused.
Test it
Send the same long prompt twice, an hour or more apart. The second response should show a non-zero usage.input_tokens_details.cached_tokens.
Not confirmed
- Whether 12-hour caching is coming to Chat Completions.
- A guaranteed deletion time; the guide says 12h is a minimum lifetime, not a deadline.
