Cache the prefix that repeats on every request — system prompts, tool definitions, prior turns — to reduce input cost.
Set the everyais option on the request (with the OpenAI SDK, pass it through extra_body).
{
"model": "everyais/claude-opus-5",
"messages": [],
"everyais": { "cache": "on", "cache_ttl": "5m" }
}| Option | Behavior |
|---|---|
cache: "on" | Attaches cache points automatically, in the order tool definitions → system → last user turn (up to 4) |
cache: "off" | Removes both the automatic attachments and any cache_control the client sent itself |
cache_ttl: "5m" | "1h" | Cache lifetime. Default 5m; 1h has a higher write cost |
Anthropic /v1/messages | cache_control breakpoints attached to blocks are passed through as-is |
| Gemini family | Implicit caching, so it hits with no extra configuration and there is no cache-write billing |
Cache read/write tokens are billed as separate line items at the provider's unit prices,
and you can confirm whether a hit actually occurred from usage.prompt_tokens_details.cached_tokens in the response.
⚠️ Check this before you turn it on — a cache write costs more than input
A cache hit (read) is billed at roughly 10% of the input unit price, but a cache write costs more than the input unit price (about 1.25x for 5m, about 2x for 1h).
So if the prefix changes on every request, you incur the write cost over and over and it ends up more expensive than leaving caching off. Turn it on only for multi-turn requests that continue a conversation with a fixed prefix; do not turn it on for one-off short requests.