Skip to main content
Supercache lets you reuse a prompt prefix for 24 hours. Write it once, then get ultra low-cost reads for later requests with the same prefix. Supercache is available with the Responses API and Chat Completions API.

Pricing

Supercache uses separate read and write prices: Apply these multipliers to the cached-input and input prices on the Pricing page. If regular cache and Supercache contain the same token, Sail uses the lower Supercache read price.
Supercache writes have a high one-time cost. Use them for large prefixes that you expect to read many times during the next 24 hours.

Write a prefix

Set metadata.supercache_write to "24h". This is the only accepted value. Replace the placeholder below with at least 1,025 tokens of reusable content.
An explicit write takes priority over a read. If the prefix is already stored, the request writes it again and starts a new 24-hour lifetime.

Read a prefix

Sail automatically uses the longest matching stored prefix. Replace the placeholder with the exact reusable content from the write request.
A read does not extend the 24-hour lifetime. Only another explicit write starts a new 24-hour lifetime.

Usage fields

Completed Responses include two decimal-string metadata fields:
  • metadata.supercached_input_tokens is the number of tokens read from Supercache.
  • metadata.supercache_write_input_tokens is the number of tokens written to Supercache.
  • usage.input_tokens_details.cached_tokens includes both regular cached input and Supercache reads.
In this example, 2,048 tokens came from Supercache and 1,024 tokens came only from regular cache. Chat Completions reports the aggregate cached count in usage.prompt_tokens_details.cached_tokens. It does not include the separate Supercache read and write counts.