Building a SaaS tool or MCP server? Get listed or sponsor AgentStackList →
ChatGPT Coding By Emily Carter

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

  1. Put your stable instructions, tools and reference docs at the start of the prompt.
  2. Add "prompt_cache_options": {"ttl": "12h"} to your Responses API request.
  3. Choose 12 hours when you first write the prefix: upgrading an existing 30-minute entry is charged as a fresh write.
  4. 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

All ChatGPT tricks →