Technique

Cache the part that never changes

Cost A few minutes First logged

  1. InA prompt with a large unchanging prefix
  2. ThenMark the stable part as cacheable
  3. OutThe same answers at a fraction of the input cost

What the move is

Find the largest block of your prompt that is identical on every call — the system prompt, the style guide, the reference document — and stop paying full price for it every time.

Why it works

Prompt caching is a documented, priced feature. Cached input is charged at a small fraction of the standard input rate, and the discount is simply not on by default.

Step by step

  1. Measure first: which requests, which models, and how many input tokens are unchanged between calls.
  2. Order the prompt so everything stable comes first and everything variable comes last.
  3. Mark the stable prefix as cacheable according to your provider's mechanism.
  4. Confirm the cache is being hit — the usage figures in the response tell you, guessing does not.
  5. Re-check the published rates periodically; a stale price in your cost model is its own bug.

Paste this

<paste the code that builds the request>

Move everything identical on every call to the front, mark that prefix cacheable, and print the cache write and read token counts from the response. Reorder the text, do not reword it.

Make it yours

Combine with batch pricing for anything that does not need an answer now. The two discounts address different halves of the bill.

Variations

  • Cache the tool definitions as well as the system prompt when they are long.
  • Split a long reference into a cached stable half and a small changing half.

Works with

Where this leads