Skip to main content
Prompt caching happens at the provider and needs nothing in the request. When a provider serves part of a prompt from its cache, the response reports it in usage, and the cached tokens are billed at pricing.input_cache_read when the model lists one, otherwise at the normal prompt rate.
To benefit, keep the stable part of a prompt, such as the system message and reference material, at the start, and vary only the end. Cache eligibility and prefix thresholds depend on the provider. Which models expose a cache rate is visible in the catalog: look for input_cache_read in pricing.

Billing

Models