Quick answer
Prompt caching lets an AI provider reuse the start of a prompt it has already processed, so you pay a lower input price and get faster replies when the same instructions repeat. To use it, put everything that stays the same, such as instructions, tool definitions and reference documents, at the start of your prompt, and the parts that change at the end. Keep that opening section exactly identical between calls. According to WorldofAI, OpenAI now keeps API caches for up to 12 hours, which suits agents that return to a task later in the day.
Key takeaways
- Caching rewards prompts that start the same way every time
- Put fixed content first and changing content last
- Even a small change near the top, like a timestamp, can break the cache
- OpenAI’s new 12-hour retention helps agents that pause and resume
- Check your usage reports for cached tokens to confirm it is working
- Caching cuts input costs, not output costs
📘 Main article: This guide supports Claude Duet: Anthropic’s Proactive AI Agent, Plus Gemini 4 Carbon’s New Checkpoint. It explains one of the OpenAI updates covered in that article, 12-hour prompt caching, and how to make the most of it.
In this guide
If you run AI automations, a large part of each request is often the same: the same instructions, the same examples, the same reference notes. Without caching, you pay full price to send that again every time.
This guide answers one question: how do you use prompt caching to cut your AI agent costs? It supports our main article, Claude Duet: Anthropic’s Proactive AI Agent, Plus Gemini 4 Carbon’s New Checkpoint, based on WorldofAI’s news round-up.
What is prompt caching?
Prompt caching means the provider remembers the processed start of a prompt and reuses it when the next request begins the same way. Reused input is usually charged at a lower rate and comes back faster.
Think of it like a briefing you give a temp at the start of the day. If they remember it, you do not have to repeat it before every task.
💡 Tip: Cached input discounts vary by provider and model, and they change. Check the current pricing page for the model you use rather than relying on any figure you read in a blog or video.
Why does 12-hour caching matter for agents?
Because agents often stop and start. According to the video, OpenAI has added 12-hour prompt caching to its API as part of its 28-day shipping pledge.
Short cache windows suit quick back-and-forth chats. An agent that checks your inbox in the morning and again after lunch would usually lose its cache in between. With a longer window, it can resume with the same instructions and still get the cheaper cached rate.
The video also says that for logged-in users of Codex and ChatGPT Work, caching is now effectively permanent, so returning to an older conversation does not start from scratch.
How should you structure a prompt for caching?
Fixed content first, changing content last. A cache match works from the very start of the prompt, so anything that changes should come after everything that does not.
| Order | What goes here | Changes between calls? |
|---|---|---|
| 1 | System instructions, brand voice, rules | No |
| 2 | Tool or function definitions | No |
| 3 | Reference material: FAQs, product details, style guide | Rarely |
| 4 | Examples of good outputs | Rarely |
| 5 | Today’s task, the new email, the user’s question | Yes |
- List what never changes in your current prompt and move it to the top.
- Freeze the wording. Save it as a single fixed block and reuse it exactly.
- Move dates, names and variables to the end.
- Group reference material in a fixed order, so it is identical each time.
- Run the same agent several times and check the usage report.
What breaks the cache?
Almost any change near the top of the prompt. Common culprits:
- A timestamp or date in the first line of instructions
- A customer name inserted into the system prompt
- Reordering tools or reference documents
- Editing the instructions slightly between runs
- Switching models, as caches are usually tied to one model
⚠️ Warning: Do not paste API keys, passwords or private customer data into your fixed prompt to “save” them for later. Caching is about cost and speed, not storage. See How to Store AI API Keys Safely in Env Files, Skills and Plugins for how to handle keys safely.
Want the bigger picture? Read Claude Duet: Anthropic’s Proactive AI Agent, Plus Gemini 4 Carbon’s New Checkpoint for everything else OpenAI, Anthropic and Google shipped this week.
How do you check that caching is working?
Look for cached tokens in your usage data. Most providers that support caching report how many input tokens were served from cache, either in each API response or in the usage dashboard.
- Run the same agent two or three times in a row
- Compare the cached token count on the first and later runs
- If it stays at zero, look for something changing near the top of the prompt
- Some providers only cache prompts above a minimum length, so check the documentation
Does this help no-code automations?
Often, yes, if the tool calls the provider’s API directly. In Zapier, Make or similar tools, the same rule applies: keep the instructions field identical and put the changing data, such as the new form entry or email, at the end.
Whether you see the saving depends on how the tool sends requests, so check your provider’s usage report after a few runs rather than assuming it works.
What are the limits of prompt caching?
- It only discounts input. Long outputs still cost the same.
- It does not improve answers. It changes cost and speed, not quality.
- Small prompts gain little. The saving grows with long, repeated instructions.
- Rules differ by provider. Retention times and discounts vary.
Pair caching with model choice for bigger savings. Our guide How to Draft With a Cheap AI Model and Refine With a Premium One shows another way to cut costs.
Frequently asked questions
Do I need to turn prompt caching on?
It depends on the provider. Some cache automatically when prompts repeat, while others need a setting or a marker in the request. Check the documentation for your model.
How long does OpenAI keep a prompt cache?
According to the video, OpenAI now supports caching for up to 12 hours in its API. Check OpenAI’s documentation for the current options.
Will caching change my AI’s answers?
No. It reuses the processed prompt, so answers should be the same as without caching.
Why are my cached tokens zero?
Usually something near the start of the prompt changes each time, such as a date or name, or the prompt is below the minimum length to be cached.
Is caching worth it for a small blog automation?
If the instructions are long and run many times a day, yes. For a short prompt that runs once a day, the saving will be small.
The bottom line
Prompt caching is one of the simplest ways to cut AI agent costs: put fixed instructions first, keep them identical and move changing details to the end. OpenAI’s longer 12-hour window makes it more useful for agents that pause and resume. Check your usage reports to confirm the savings, then read our main article for the rest of this week’s news.
Related posts
- How to Draft With a Cheap AI Model and Refine With a Premium One
- Cheap vs Premium AI Model: How to Run a Fair Side-by-Side Test
- How to Store AI API Keys Safely in Env Files, Skills and Plugins

[…] token costs are part of your concern, our guide on using prompt caching to cut AI agent costs covers another way to keep sessions […]
[…] times cheaper than normal input, so it matters if you resend the same long instructions. Our guide How to Use Prompt Caching to Cut Your AI Agent Costs explains how to make the most of […]