What this thread does
Do first: set "prewarm": true inside prompt_cache_options in a Responses API request.
When you need it
Prepare known instructions, tool definitions or reference material before a user's question arrives. The page describes startup prewarming as a way to reduce time to first token on the later request.
Steps
1. Send the page's prewarm request, which prepares the cache without generating output. Formatting is compressed here:
{
"model": "gpt-6.2-sol",
"input": [{
"role": "developer",
"content": "Your app's shared instructions and reference material..."
}],
"prompt_cache_options": { "prewarm": true }
}
2. Wait for that request to complete. Then send the actual question with the same prefix and prewarm omitted or set to false. The page's follow-up omits it:
{
"model": "gpt-6.2-sol",
"input": [
{ "role": "developer",
"content": "Your app's shared instructions and reference material..." },
{ "role": "user", "content": "The user's question..." }
]
}
Check it worked
The page tells you to monitor usage.input_tokens_details.cached_tokens and usage.input_tokens_details.cache_write_tokens, along with latency and realized cost. It also points to the Prompt Caching Dashboard for cache hit rates. Prewarm itself does not generate output.
Limits
The page makes prewarming available for GPT-5.6 and later. For those models, a prefix needs at least 1,024 cacheable tokens, excluding hidden system content. Tokens written during prewarm are billed at the cache-write rate for the selected lifetime. Keep the prompt prefix the same for the actual request; the model name above is the page's example.
Not for: choosing explicit prompt-cache boundaries; see openai-api-set-explicit-prompt-cache-breakpoints.
Sources
- Prompt caching, OpenAI API documentation, read 2026-11-24: "prepare the prompt cache without generating output"
Checked
2026-11-24; read <https://developers.openai.com/api/docs/guides/prompt-caching.md#prewarm-the-cache>; no command was run.
Started from a post by @OpenAI, packaged by the editor. Original post