Skip to main content
A model call can be cheaper when the vendor remembers the start of the request, and every call records what it used. This page covers both: what a prompt cache is, the prompt_cache setting of the language model provider, and the usage a call records.

What a prompt cache is

A vendor that caches keeps the processed start of a request (instructions, documents, earlier turns) for a few minutes. A later request that starts with exactly the same content reads it from the cache, at about a tenth of the input price and faster. The first request writes the cache. Anthropic bills that write at 1.25 times the input price, and OpenAI does too from GPT-5.6; Gemini’s own caching costs nothing extra. A conversation about a 20,000-token PDF, three turns within five minutes, on an Anthropic model, counting only the PDF: Content shorter than the vendor’s minimum (512 to 4,096 tokens, by model) is never cached and costs the same either way. Conversations and tool loops, which resend everything every turn, are where a cache pays.

Each vendor’s default

From the vendors’ documentation of 2026-11-16: The same vendors, by what a cache write and a read cost: Gateways pass the underlying vendor’s behavior through. An Anthropic model needs marks through OpenRouter and Vercel; Databricks caches only its own hosted Claude models, and only what is marked. BlobHub places no marks through Vercel, so an Anthropic model there is not cached.

prompt_cache

prompt_cache is a setting of the language model provider, off or on. A cache write costs more than plain input, so caching is off unless a flow turns it on: unset means off, unlike the other settings, whose unset value leaves the vendor’s default. A run may give it too. With off, BlobHub adds no cost of its own.
  • Anthropic gets no mark.
  • An OpenAI model of GPT-5.6 or later, one the catalog marks explicit_cache_mode, is asked for explicit mode with no breakpoints, which turns its paid default off.
  • An OpenAI model of GPT-5.6 or later that the catalog does not list is sent nothing, and OpenAI’s paid default applies until the catalog lists it.
  • The free automatic caching of Gemini and of earlier OpenAI models stays, since it can only lower the bill.
  • Through a gateway no mark is sent. OpenRouter passes the explicit-mode request on to OpenAI and strips it for other vendors; the other gateways send nothing, so what a model’s paid default does there is the gateway’s behavior.
With on: Where an entry sends nothing, on posts the warning <vendor> places no cache marks; prompt_cache on has no effect. Lifetime. The vendor’s default applies: 5 minutes at Anthropic, 30 at OpenAI. Longer lifetimes go in the provider’s vendor_settings, which reach the vendor’s request as extra fields. A hit needs a stable prefix, the start of the request exactly as it was the time before. The platform keeps it stable: see Chat.

Usage

Every call records its usage in one shape, whatever the vendor:
Every field is present with 0 where the vendor reports none; by_modality is left out instead. A field with a suffix is a part of its total, never added to it. Where it is recorded. The provider’s component.output event carries usage in its attributes, on every call, whether or not the session logs data. See Execution Events. The answer carries the same shape in metadata.usage, which a thread item keeps.