Quick start
Sendprompt_cache_key with every request in a session. Add prompt_cache_options on the first one to open the window.
Request parameters
Window lifecycle
Retention is scoped to your account and
prompt_cache_key. It works with streaming and non-streaming, chat and text-completions.
Cache breakpoints
Most prompts are a stable prefix (system instructions, tools, a document) followed by a variable tail. Mark where the reusable prefix ends with aprompt_cache_breakpoint on a message content part — retention then applies to everything up to and including that part, and ignores the variable remainder, so the retained cache stays stable across requests even as the question changes.
Put anything that changes between calls (timestamps, user ids, retrieved chunks) after the breakpoint, so the prefix before it stays identical and matches in full. Changing a token inside the retained prefix only recomputes from the point of divergence onward — you still get the cache-read rate on the portion that still matches.
Cache granularity
Caches are written in fixed increments, so the retained portion is always rounded down to a whole multiple of the model’s cache granularity. Whatever is left over is billed as standard input. The granularity differs per model. On Nemotron-3-Ultra it is 8,192 tokens: a 20,000-token prompt retains 16,384 tokens (two increments), and the remaining 3,616 are billed as standard input. A breakpoint shorter than one increment retains nothing.Check the model page for the granularity of the model you’re using — it determines how much of your prompt is actually cacheable.
Reading the response
Every response reports what happened inusage.prompt_tokens_details.
Pricing
Relative to the model’s standard input price:
Only whole cacheable blocks count as cache read/write; any remainder is billed as standard input. The write premium applies only when a request actually creates or extends the retention window — reuse inside a window you’ve already paid for is billed at the read rate.
Model support
More models to follow. On a model without retention support,
prompt_cache_options is ignored and the request is billed as standard input.