MultiverseAI Logo
    Tutorials

    The Setting That Can Cut Your AI Bill Dramatically (Most Teams Never Turn It On)

    Will Schulz5 min read
    The Setting That Can Cut Your AI Bill Dramatically (Most Teams Never Turn It On)

    Most AI applications send the same thousands of tokens on every request: the system prompt, tool definitions, a policy document, the conversation so far. Without caching, the provider charges full price to process that text every time. Prompt caching changes that, and at current list prices it can cut the repeated part of your input cost by 90% or more. Here's how it works at Anthropic, OpenAI and Google, using only numbers from their own docs.

    What Prompt Caching Actually Is

    When a model reads your prompt, it builds internal state for every token. Prompt caching stores that state for a prompt prefix. If the next request starts with exactly the same prefix, the provider reuses the stored work instead of recomputing it.

    OpenAI describes this as preserving "key-value (KV) states" that can be reused when requests share identical prompt prefixes (OpenAI prompt caching guide). Anthropic's docs explain the same idea. The system checks whether the prefix up to a cache breakpoint is already cached, uses it if so, and otherwise processes the full prompt and caches the prefix (Anthropic prompt caching docs).

    The key word is prefix. A cache hit needs the start of the prompt to be byte-for-byte identical. If you put a timestamp in the first line of your system prompt, nothing after it can ever hit the cache.

    Anthropic (Claude): Opt-In, With the Deepest Discounts

    On the Claude API you turn caching on with cache_control. You can either set one top-level field and let the system manage breakpoints ("automatic caching") or place up to 4 explicit breakpoints on specific content blocks. Prefixes are built in the order tools → system → messages, and a change at any level invalidates that level and everything after it (Anthropic prompt caching docs).

    Pricing works as multipliers on the base input price (Anthropic pricing):

    • 5-minute cache write: 1.25× base input
    • 1-hour cache write: 2× base input
    • Cache read: 0.1× base input on most models, 0.05× on Claude Opus 5.5 and Claude Sonnet 5.5, and 0.025× on Claude Fable 5.1 and Claude Mythos 5.1

    Anthropic states the break-even directly: caching "pays off after one cache read for the 5-minute duration (1.25x write), or after two cache reads for the 1-hour duration (2x write)." The docs also note that these multipliers stack with the Batch API discount, which is 50% off input and output (Anthropic pricing).

    There is a minimum size. Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5 can cache prompts from 512 tokens. Some older models need 1,024, 2,048 or 4,096 tokens, and anything shorter isn't cached even when it's marked (Anthropic prompt caching docs).

    OpenAI: On by Default, With Some Newer Wrinkles

    OpenAI caching is "enabled by default for supported OpenAI models." GPT-5.6 and later models need "1,024 visible input tokens" before caching activates. Cached input tokens usually cost "0.1× that rate" (0.05× on GPT-6.1 Sol). For GPT-5.6 and later, "cache writes cost 1.25× the standard, uncached input-token rate" (OpenAI prompt caching guide).

    Retention depends on the model generation:

    • GPT-5.6 and later: a cached prefix "remains eligible for reuse for 30 minutes after its most recent write or reuse," controlled by prompt_cache_options.ttl.
    • Earlier models: in-memory entries "typically remain active for around 5 to 10 minutes of inactivity, up to one hour." Supported models such as gpt-5.5, gpt-5.4 and gpt-4.1 can keep entries for up to 24 hours with prompt_cache_retention: "24h".

    As of October 2026, OpenAI's pricing page lists GPT-6.1 Sol at $2.00 per million input tokens and $0.10 per million cached input tokens, and GPT-5.4 at $2.50 and $0.25 (OpenAI pricing).

    Google Gemini: Implicit by Default, Explicit for a Guarantee

    Gemini offers two modes. Implicit caching "is enabled by default for all Gemini 2.5 and newer models," and Google says, "We automatically pass on cost savings if your request hits caches." The minimum is 4,096 tokens on the Gemini 3.x Flash models and 3.1 Pro Preview, and 2,048 on Gemini 2.5 Flash and Pro (Gemini caching docs).

    Explicit caching is available through the generateContent API. You create a cache object yourself, and "if not set, the TTL defaults to 1 hour." Google describes explicit caching as carrying a "cost saving guarantee," which implicit caching doesn't have. Explicit caches are billed three ways: cached tokens at a reduced rate, storage for the length of the TTL, and normal rates for uncached input and output (Gemini explicit caching docs).

    As of October 2026, Gemini 3.8 Flash lists $0.75 per million input tokens, $0.075 for cached tokens and $0.50 per million tokens per hour of storage, at prices that run through 31 December 2026. Those figures double on 1 January 2027 (Gemini pricing).

    The Math: One Worked Example

    Take a support agent that sends a 20,000-token prefix (system prompt, tool schemas and a policy document) on each of 1,000 requests, with the requests close enough together that the cache stays warm. Here is the cost of that prefix alone on Claude Sonnet 5.5, using Anthropic's list prices of $2/MTok base input, $2.50/MTok for a 5-minute write and $0.10/MTok for a cache read (Anthropic pricing):

    • No caching: 20M tokens × $2/MTok = $40.00
    • With caching: one write (20k × $2.50/MTok = $0.05) plus 999 reads (19.98M × $0.10/MTok ≈ $2.00) = about $2.05

    That is roughly a 95% cut on the repeated portion. Output tokens and the new user message each turn are still billed at normal rates, so your total bill drops by less than that. Real savings also depend on your hit rate: if traffic is bursty and the cache expires between requests, you pay for the write again.

    Five Rules for Getting Cache Hits

    1. Static first, dynamic last. OpenAI's guidance is to "put stable developer instructions and shared reference material first" and to move timestamps or user-specific content to the end (OpenAI). Google gives the same advice: put "large and common contents at the beginning of your prompt" (Google).
    2. Freeze your tool list. On Claude, tools come first in the prefix, so adding or reordering a tool invalidates everything after it.
    3. Mark the last block that never changes. Anthropic's docs say to place cache_control on the last block that stays identical across requests. If that block changes, every request misses.
    4. Match TTL to traffic. Use 5-minute caches for chat-speed traffic, and 1-hour (Anthropic) or extended retention (OpenAI) for jobs that run less often.
    5. Measure it. Check cache_read_input_tokens and cache_creation_input_tokens on Claude, cached_tokens in usage.input_tokens_details on OpenAI, and the cached-token count in Gemini's usage metadata. If reads stay at zero, your prefix is changing.

    Where MultiverseAI Comes In

    Caching rewards consistency, and workflows tend to be consistent. A Workflow Builder graph (55+ node types) that runs on a schedule, webhook or chat trigger usually sends the same instructions to the same model run after run, which is the repeated-prefix pattern described above. Keep each node's instructions stable and put the per-run data last. You can choose OpenAI, Anthropic, Google or xAI models for each node from one account. Billing is metered in credits: 1 credit = $0.01, charged at provider cost plus 50%, with fractions carried over rather than rounded up.

    Want to see what your workflows cost? Start free with 100 credits or explore the Workflow Builder. Pro is $29/month.

    Sources

    1. Anthropic, "Prompt caching," Claude Platform Docs. https://platform.claude.com/docs/en/build-with-claude/prompt-caching
    2. Anthropic, "Pricing," Claude Platform Docs. https://platform.claude.com/docs/en/about-claude/pricing
    3. OpenAI, "Prompt caching," OpenAI API Docs. https://developers.openai.com/api/docs/guides/prompt-caching
    4. OpenAI, "Pricing," OpenAI API Docs. https://developers.openai.com/api/docs/pricing
    5. Google, "Context caching," Gemini API Docs. https://ai.google.dev/gemini-api/docs/caching
    6. Google, "Context caching (generateContent)," Gemini API Docs. https://ai.google.dev/gemini-api/docs/generate-content/caching
    7. Google, "Gemini Developer API pricing," Gemini API Docs. https://ai.google.dev/gemini-api/docs/pricing
    More articles

    Keep reading

    Get Started Today

    Put it to work.

    Start with 100 free credits — every model, every workflow node and every agent tool is included.

    100 free credits to start
    No credit card required
    Cancel anytime