Building & Running AI intermediate

Prompt Caching

Reusing the processed form of a repeated prompt prefix so you do not pay full price for it again.

When many requests share a long, stable prefix — a system prompt, a document, a set of examples — caching lets the provider skip recomputing it. The saving is large and mostly free: put the stable content first and the variable content last.

In practice: A 20,000-token manual cached once, then queried a thousand times cheaply.

Where this comes up