# OpenAI Adds 12-Hour Prompt Caching Option to API

Developers can now extend prompt cache retention to 12 hours instead of the default 30 minutes to maintain persistent context across spaced requests.

- Developers can select 12h retention, keep the 30-minute default, or mix both durations in a single API request.
- Requests can apply 12-hour caching to shared instructions and 30-minute caching to recent conversation context.
- Cached prompts are billed at the lower cached-input rate even when calls are hours apart.

## Why it matters

Developers running persistent agents with large shared contexts can cut input token costs across multi-hour query gaps.

## Sources

- [OpenAI: OpenAI Adds 12-Hour Prompt Caching Option to API](https://x.com/OpenAIDevs/status/2112603916076781778)

---

Summarized by dstilled on 2026-10-20. https://dstilled.ai/story/ed2ed2a3-d2e8-4627-85a5-96ae66f34cab
