Optimization

Prompt caching

A provider feature that stores the repeated front portion of your prompt so you don't pay full price to send it again. You mark the stable part (instructions, examples, a document); the provider bills it at a discount on subsequent calls. See cached tokens.

Example

A coding assistant sends the same 10,000-token codebase context on every question in a session. Prompt caching drops the cost of that context by roughly 90% after the first call, so a 20-question session costs a fraction of what it would without caching.