Prompt caching
Prompt caching lets a provider reuse a stable prefix of your request — a system prompt, tool definitions, a long document — instead of reprocessing it on every call. Reused ("cache read") tokens are billed far below the normal input price. Mizan takes care of enabling this where it needs to be enabled, and always bills you the real, discounted amount.
What it is
Most chat and agent traffic sends the same system prompt and tool list on every turn, with only the conversation growing. Providers that support prompt caching let you mark that stable prefix once; a later call with the same prefix within a short time window gets it served from cache at a steep discount instead of being billed at full price again. The first call that establishes the cache (a "cache write") costs a little more than plain input — subsequent reads within the cache window cost a fraction of it, so the savings compound the more a session reuses the same context.
Agent & multi-turn workloads
Agent harnesses resend the same system prompt and tool definitions on every turn, and subagents typically inherit their parent's context verbatim — that repetition is exactly what prompt caching is built for. Mizan sends every wallet-billed call for a given provider out through one platform account, so a cache written by an earlier turn — yours, a retry, a sibling subagent, even a different session — is already warm for the next matching call. There's no session pinning or sticky routing to configure on your end; it falls out of how Mizan connects to providers, not something layered on top.
Provider support
Support and mechanics vary by provider — Mizan handles each one the way it needs to be handled, with nothing for you to configure:
- Anthropic requires an explicit cache breakpoint on the content you want cached. Mizan automatically marks your system prompt and tool definitions as cacheable on every Anthropic request — no changes needed on your end.
- OpenAI caches automatically for prompts above a token-count threshold. Nothing to enable; it just happens upstream.
- Gemini also caches implicitly, automatically, with no request changes required.
More providers land here as Mizan adds cache-aware pricing for them.
How billing works
Your Mizan wallet is debited the real, cache-discounted cost of every call — never the full, uncached price with a rebate applied later. When a call reads from cache, the debit reflects that immediately. You can see the running total of what caching has saved you under Analytics, in the "Caching savings" section — alongside what the same calls would have cost with no caching at all.
BYOK and caching
For BYOK calls, your own provider account is billed directly — caching still lowers that bill, it's just outside Mizan's wallet and ledger, so it doesn't show up in the Analytics savings section or affect your wallet balance either way.