Cut your AI bill with prompt caching and batch discounts
If your bot sends the same long instructions every time, caching makes the repeat part much cheaper. If results can wait a few hours, batch processing halves the price at several providers.
What the bot does
- Puts the parts that never change (instructions, examples, reference docs) at the start of the prompt so they can be cached.
- Re-uses that cached part on every run instead of paying full price for it.
- Collects jobs that aren't urgent (nightly summaries, weekly reports) into one batch.
- Sends the batch at the discounted rate and picks up the results later.
What you end up with
The same bot output, with repeated instructions billed at a fraction of the input price and non-urgent work at half price.
Copy-paste prompt
Fill in the [brackets]. Then paste it into any tool below.
Rewrite my bot prompt for caching. Put everything that stays the same on every run (role, rules, examples, reference text) first, and everything that changes (today's emails, today's date) last. Mark where the fixed part ends. My prompt: [paste].
Tools that can do it today
- automationn8nCall batch endpoints from a workflowFree to self-host; paid cloud plans
- chatClaudePrompt caching and Message Batches on the APIFree plan; paid plans add more
- chatGeminiBatch API and context caching on the paid tierFree plan; paid plans add more
Plans and limits change; check each tool's page.
Watch out
- Caching only pays if the same prefix is re-used soon: Anthropic's 5-minute cache write costs 1.25x, and a read costs 0.1x the input price on most models.
- Batch jobs aren't instant. OpenAI says each batch completes within 24 hours.
- Not every model supports batch; check the provider's model page.
Questions people ask
Which AI tools can do this?
n8n, Claude or Gemini can do this today. Paste the copy-paste prompt on this page into any of them and fill in the [brackets].
How hard is it to set up?
It's rated Advanced. Start with the steps under “What the bot does”.
What should I watch out for?
Caching only pays if the same prefix is re-used soon: Anthropic's 5-minute cache write costs 1.25x, and a read costs 0.1x the input price on most models.
Sources
- docsOpenAI Batch API guide: 50% cost discount, completes within 24 hours
- docsAnthropic pricing: prompt caching multipliers and 50% Batch API discount
- docsGemini API pricing: Batch API (50% cost reduction) and context caching
- docsMistral pricing FAQ: batch reduces price by 50%, cached input up to 90% off
Last checked Oct 21, 2026. Self-reported results from posts are the poster's own claims.