{"uid":"cap_bgkB4xJB_l5HsTmi-T9Nf","slug":"llm-cost-capacity-calc-prompt-cache-savings-67f59249","name":"LLM Cost & Capacity Calc – Prompt Cache Savings","description":"Prompt-cache savings for a shared prefix: cost with and without caching, break-even requests and percent saved.","url":"https://llm-cost-calc.x402tookit.com/cache-savings?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["prefixTokens","requests","inputPricePerMTok"],"properties":{"requests":{"type":"integer","description":"Requests that reuse the prefix within the cache lifetime, 1 to 1e9"},"prefixTokens":{"type":"number","description":"Tokens in the cacheable shared prefix"},"readMultiplier":{"type":"number","description":"Cache-read price as a multiple of normal input (default 0.1)"},"uncachedTokens":{"type":"number","description":"Extra non-cached input tokens per request (default 0)"},"writeMultiplier":{"type":"number","description":"Cache-write price as a multiple of normal input (default 1.25)"},"inputPricePerMTok":{"type":"number","description":"Normal price per million input tokens"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"savings":{"type":["null","number"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"requests":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"readMultiplier":{"type":["null","number"]},"savingsPercent":{"type":["null","number"]},"costWithCaching":{"type":["null","number"]},"writeMultiplier":{"type":["null","number"]},"breakEvenRequests":{"type":["null","number"]},"costWithoutCaching":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vkhQwMU4msFutyawZzDgL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates prompt-caching cost savings for a shared prefix: costs with and without caching, break-even request count, and percent saved.","exampleAgentPrompt":"I have a shared system prompt of 8000 tokens that 200 requests reuse daily, and I'm paying $3 per million input tokens — can you calculate my prompt-cache savings using a 0.1x read price and 1.25x write price, and tell me the break-even request count?","exampleUseCases":[{"title":"Evaluating caching for a RAG pipeline","prompt":"My RAG system prefixes every query with a 15000-token document chunk, and I send about 500 requests per day at $2 per million input tokens. Using default cache-read (0.1x) and cache-write (1.25x) multipliers, how much would I save with prompt caching and how many requests does it take to break even?"},{"title":"Comparing caching tiers for a chatbot","prompt":"We run a customer support chatbot with a 5000-token shared system prompt across 1000 daily sessions, paying $1.50 per million input tokens. Can you work out whether prompt caching is worth enabling — show me the cost with and without caching and the percent saved?"},{"title":"Sizing cache budget for a new LLM product","prompt":"I'm launching an AI product where every user request shares a 20000-token prefix. If I expect 50 requests reusing that prefix, my input price is $5 per million tokens, and cache reads cost 0.1x with writes at 1.25x, what's my total cost with caching versus without and what percentage am I saving?"}],"resultDescription":"Returns a JSON object with: total cost with caching, total cost without caching, dollar savings, savings as a percentage, break-even number of requests required for caching to become profitable, cache read and write multipliers used, a human-readable summary, and a verdict on whether caching is advisable.","failureModes":["Missing required query params (prefixTokens, requests, inputPricePerMTok) returns a 400 error","requests value of 0 or negative may cause division errors or nonsensical break-even output","Extremely small prefix token counts may yield negative or zero savings depending on multipliers","Invalid multiplier values (e.g. readMultiplier >= 1) may produce unexpected non-savings results","Network or upstream service unavailability returns a 5xx error"],"whenToPreferThis":"Use this endpoint when you need a quick, parameterized calculation of whether LLM prompt caching is cost-effective for a specific workload — particularly when you have a shared prefix (system prompt, RAG document, few-shot examples) reused across many requests and want to quantify break-even points and savings before committing to a caching strategy. Prefer this over manual spreadsheet math or generic cost calculators when you need to factor in provider-specific read/write multipliers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:15:02.257Z","isFirstParty":false,"canonicalSlug":"llm-cost-capacity-calc-prompt-cache-savings-67f59249"}