Hello Perplexity API team,
we use the Agent API (POST /v1/agent) with openai/gpt-6.1-sol for long
structured-output calls (60–90k input tokens). While checking our costs we
found three things about prompt caching that the docs do not cover. Test
requests from 2026-10-20, about 10:55–10:59 UTC, are listed below.
- Cache writes are billed but not documented
Every gpt-6.1-sol request bills the full input as
cache_creation_input_tokens (cost.cache_creation_cost), which works out to
1.25x the input price ($2.50 instead of $2.00 per 1M tokens). The Agent API
Models page lists input, output and cache-read prices only, with no cache-write
price. Across 215 production-like requests we were billed for 5.29M written
tokens and 1,039 read tokens.
- Is the cache-write surcharge intended?
- Can we opt out of cache writes for requests that will not be reused?
Example: resp_2ea3584b-e620-4b9c-83b5-252315d591ec
- Explicit cache breakpoints are dropped
OpenAI documents prompt_cache_options (mode “explicit”) and
prompt_cache_breakpoint on input_text parts for GPT-5.6 and later. The Agent
API accepts both without an error, but the response echoes
prompt_cache_options as null and still writes the full input. Mode “explicit”
with no breakpoint should write nothing, but it still writes everything.
Because of this, a follow-up request that resends the same ~60–90k-token
prefix plus new turns (our validation retries) never reads from the cache.
- Do you plan to pass OpenAI’s explicit cache breakpoints through?
- If not, is there another way to get a cache read on a shared prefix when
new turns are appended?
Examples:
resp_d9f8439a-7fce-4d0b-94f7-a406935fbb0b (explicit breakpoint, 0 read)
resp_1c3168c9-f86a-48fa-a735-3e41f9097a38 (same prefix + 2 turns, 0 read)
- prompt_cache_key for OpenAI models
Identical requests without prompt_cache_key never read from the cache (0 of
3). With prompt_cache_key they did (3 of 3, about 95% cheaper). The field is
not in the API reference schema; it appears only in the changelog under
presets.
- Is prompt_cache_key the supported way to get cache reads for OpenAI models?
- Does it affect routing?
- Are there limits we should know about, such as the number of keys or
requests per key?
Examples:
resp_27f8e738-58e4-4c44-a7d1-1de857c37331 (no key, 0 read)
resp_d1a9796f-76f6-4f1c-bddd-792645d6704a (with key, 11,926 tokens read)
Thank you,
Marius