Overview
60db caches work you repeat, so repeated requests are cheaper and faster. Cached input is billed at a discounted cached-input rate. Check your plan’s current rates withGET /plans or pricing.cached_input_rate_per_million in GET /v1/usage.
Chat: automatic prefix caching
Caching is automatic. When consecutive requests share the same prompt prefix (system prompt, tool definitions, reference documents), the shared prefix is served from cache. You do not need to change your requests. Read the result from the response:stream_options: {"include_usage": true} to receive the final usage chunk.
Order your prompt for caching
Only a prefix can be cached. Put static content first and variable content last:- System prompt
- Tool definitions
- Reference documents / few-shot examples
- Conversation history
- The latest user message
Optional hints: cache_control and prompt_cache_key
Hints are optional. Caching happens with or without them, and hints give no TTL guarantee.
cache_control:{"type": "ephemeral"}, with optional"ttl": "5m"or"1h". Accepted on message content parts, on whole messages, and ontools[]entries. Maximum 4 breakpoints per request. Any other shape returns400.prompt_cache_key: string up to 256 characters. Use the same key for requests that share a prefix.
Speech-to-text: re-upload cache
POST /stt returns the stored transcript when the same workspace uploads byte-identical audio with the same options (language(s), diarize, timestamps, keywords, context, speaker counts, script_correction) within 30 days. The audio is not re-processed, and the request is billed at the STT cached rate.
The response includes
cached: true when served from cache, otherwise false. The cache is scoped per workspace and does not apply to WebSocket or streaming STT.
Where cached usage appears
- Chat response:
usage.prompt_tokens_details.cached_tokens - Usage logs:
metadata.cached_tokenson LLM rows - Analytics:
llm_cached_tokens - Realtime:
llm_tokens_cachedin usage events, andinput_token_details.cached_tokensinresponse.done
Billing
Cached input tokens (Chat) and cached STT re-uploads are billed at a discounted cached rate. When a cached rate is lower than the base rate, it appears incredit_costs from GET /plans.