{
  "schema": 1,
  "slug": "prompt-cache-break-even",
  "topicId": "prompt-cache-break-even",
  "date": "2026-12-03",
  "title": "Prompt caching can pay after 1 or 2 successful reuses",
  "description": "Calculate when prompt caching beats ordinary input prices, how missed reads change savings, and when a longer Claude cache lifetime pays.",
  "excerpt": "A calculated comparison of cache writes, reads and misses on Claude, OpenAI and Gemini, with prompt sizes, request spacing and a calculator.",
  "question": "How many times must a prompt be reused before prompt caching pays for itself?",
  "tags": [
    "Prompt caching",
    "API pricing",
    "Cost calculation"
  ],
  "allowedTerms": [
    "Claude Sonnet 5.5",
    "GPT-6.2 Sol",
    "Gemini 3.1 Pro Preview"
  ],
  "sources": [
    {
      "id": "claude-pricing",
      "url": "https://platform.claude.com/docs/en/about-claude/pricing.md",
      "publisher": "Anthropic",
      "title": "Claude API pricing",
      "retrieved": "2026-12-03",
      "quotes": {
        "columns": "| Model | Base input tokens | 5m cache writes | 1h cache writes | Cache hits and refreshes | Output tokens |",
        "sonnet": "| Claude Sonnet 5.5 | $2 / MTok | $2.50 / MTok | $4 / MTok | $0.10 / MTok<sup>2</sup> | $10 / MTok |",
        "million": "* **MTok:** Million tokens. $5 / MTok is $5 for every million tokens."
      }
    },
    {
      "id": "claude-caching",
      "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-caching.md",
      "publisher": "Anthropic",
      "title": "Claude prompt caching",
      "retrieved": "2026-12-03",
      "quotes": {
        "shortWrite": "Cache write tokens with a 5-minute TTL are 1.25 times the base input tokens price.",
        "longWrite": "Cache write tokens with a 1-hour TTL are 2 times the base input tokens price.",
        "refresh": "By default, the cache has a 5-minute lifetime. The cache is refreshed for no additional cost each time the cached content is used.",
        "longRefresh": "When you have prompts that are likely used less frequently than every 5 minutes, but more frequently than every hour. For example, when an agentic side-agent takes longer than 5 minutes, or when storing a long chat conversation with a user and you generally expect that user might not respond in the next 5 minutes.",
        "clock": "The lifetime is measured from the start of the request that writes or reads the cache entry, not from the end of its response.",
        "minimum": "512 tokens for Claude Fable 5.2, [Claude Mythos 5.2](https://platform.claude.com/docs/en/models/mythos-5-2/overview), Claude Fable 5.1, [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5",
        "ordinaryUsage": "* `input_tokens`: Number of input tokens that were not read from or used to create a cache (that is, tokens after the last cache breakpoint)",
        "writeUsage": "* `cache_creation_input_tokens`: Number of tokens written to the cache when creating a new entry",
        "readUsage": "* `cache_read_input_tokens`: Number of tokens retrieved from the cache for this request"
      }
    },
    {
      "id": "openai-pricing",
      "url": "https://developers.openai.com/api/docs/pricing.md",
      "publisher": "OpenAI",
      "title": "OpenAI API pricing",
      "retrieved": "2026-12-03",
      "quotes": {
        "units": "Prices per 1M tokens.",
        "columns": "| Model | Short context input | Short context output | Short context cached input | Short context 30m write | Short context 12h write | Long context input | Long context output | Long context cached input | Long context 30m write | Long context 12h write |",
        "sol": "| gpt-6.2-sol | $2.00 | $10.00 | $0.10 | $2.50 | $5.00 | $4.00 | $15.00 | $0.20 | $5.00 | $10.00 |"
      }
    },
    {
      "id": "openai-caching",
      "url": "https://developers.openai.com/api/docs/guides/prompt-caching.md",
      "publisher": "OpenAI",
      "title": "OpenAI prompt caching",
      "retrieved": "2026-12-03",
      "quotes": {
        "rates": "For GPT-5.6 and later, cache writes cost 1.25× the standard, uncached input-token rate for the default 30-minute lifetime. In the Responses API, you can choose a [12-hour minimum lifetime](#cache-lifetime) at a write rate of 2.5× ordinary input.",
        "total": "These are total write rates, not surcharges on top of ordinary input. Cache-read rates are the same for both lifetimes.",
        "minimum": "| Minimum cacheable prefix   | 1,024 visible input tokens                                                                 | Varies by request settings                                  | Varies by request settings                                                      |",
        "refresh": "A 30-minute read refreshes coverage to at least 30 minutes after that read. If it uses an entry with valid 12-hour coverage, it preserves the later of the existing expiry and 30 minutes after the read. It does not restart a 12-hour clock or incur another write charge.",
        "minimumLifetime": "OpenAI may retain entries longer than the requested minimum;",
        "prefix": "Cache reuse requires the entire rendered prefix to match. If content or a relevant setting changes before a breakpoint, the prefix after that change cannot match the existing cache entry."
      }
    },
    {
      "id": "gemini-pricing",
      "url": "https://aistudio.google.com/docs/pricing",
      "publisher": "Google",
      "title": "Gemini API pricing",
      "retrieved": "2026-12-03",
      "quotes": {
        "model": "## Gemini 3.1 Pro Preview  {% id=\"gemini-3.1-pro-preview\" %}",
        "units": "* Paid Tier, per 1M tokens in USD",
        "input": "* Input price\n  * Not available\n  * $2.00, prompts <= 200k tokens    \n  $4.00, prompts > 200k tokens",
        "read": "* Context caching price\n  * Not available\n  * $0.20, prompts <= 200k tokens    \n  $0.40, prompts > 200k"
      }
    },
    {
      "id": "gemini-caching",
      "url": "https://aistudio.google.com/docs/caching?generate-content=true",
      "publisher": "Google",
      "title": "Gemini GenerateContent context caching",
      "retrieved": "2026-12-03",
      "quotes": {
        "implicit": "Implicit caching is enabled by default on all Gemini 2.5 and newer models. When a request matches a cached prefix above the model's token floor, the API bills those tokens at the cached input rate. You pay no storage fees and no cache-write surcharges.",
        "minimum": "| Gemini 3.1 Pro Preview (`gemini-3.1-pro-preview`) | 4,096 | 90% (Standard, Priority), 80% (Flex, Batch) | None |",
        "retention": "Implicit caching is opportunistic and offers no guaranteed retention window or cost savings.",
        "maximum": "Each entry has a best-effort TTL of up to 24 hours, and the server evicts entries dynamically based on capacity and request routing."
      }
    },
    {
      "id": "openai-model",
      "url": "https://developers.openai.com/api/docs/models/gpt-6.2-sol.md",
      "publisher": "OpenAI",
      "title": "GPT-6.2 Sol model pricing and context tiers",
      "retrieved": "2026-12-03",
      "quotes": {
        "context": "For requests with more than 272K input tokens, input and cache rates double and output costs 1.5 times the short-context rate for the full request."
      }
    }
  ],
  "inputs": {
    "claudeInputPrice": {
      "value": 2,
      "unit": "USD per million tokens",
      "label": "Claude Sonnet 5.5 input price",
      "source": "claude-pricing",
      "quote": "sonnet",
      "match": "$2"
    },
    "claudeReadPrice": {
      "value": 0.1,
      "unit": "USD per million tokens",
      "label": "Claude Sonnet 5.5 cache read price",
      "source": "claude-pricing",
      "quote": "sonnet",
      "match": "$0.10"
    },
    "claudeOutputPrice": {
      "value": 10,
      "unit": "USD per million tokens",
      "label": "Claude Sonnet 5.5 output price",
      "source": "claude-pricing",
      "quote": "sonnet",
      "match": "$10"
    },
    "claudeShortWriteMultiplier": {
      "value": 1.25,
      "unit": "x base input price",
      "label": "Five-minute cache write multiplier",
      "source": "claude-caching",
      "quote": "shortWrite",
      "match": "1.25"
    },
    "claudeLongWriteMultiplier": {
      "value": 2,
      "unit": "x base input price",
      "label": "One-hour cache write multiplier",
      "source": "claude-caching",
      "quote": "longWrite",
      "match": "2"
    },
    "claudeShortMinutes": {
      "value": 5,
      "unit": "minutes",
      "label": "Five-minute cache lifetime",
      "source": "claude-caching",
      "quote": "shortWrite",
      "match": "5"
    },
    "claudeLongHours": {
      "value": 1,
      "unit": "hours",
      "label": "One-hour cache lifetime",
      "source": "claude-caching",
      "quote": "longWrite",
      "match": "1"
    },
    "claudeMinimumTokens": {
      "value": 512,
      "unit": "tokens",
      "label": "Claude Sonnet 5.5 cacheable prefix minimum",
      "source": "claude-caching",
      "quote": "minimum",
      "match": "512"
    },
    "openaiInputPrice": {
      "value": 2,
      "unit": "USD per million tokens",
      "label": "GPT-6.2 Sol short-context input price",
      "source": "openai-pricing",
      "quote": "sol",
      "match": "$2.00"
    },
    "openaiReadPrice": {
      "value": 0.1,
      "unit": "USD per million tokens",
      "label": "GPT-6.2 Sol short-context cache read price",
      "source": "openai-pricing",
      "quote": "sol",
      "match": "$0.10"
    },
    "openaiShortWriteMultiplier": {
      "value": 1.25,
      "unit": "x base input price",
      "label": "Thirty-minute cache write multiplier",
      "source": "openai-caching",
      "quote": "rates",
      "match": "1.25"
    },
    "openaiLongWriteMultiplier": {
      "value": 2.5,
      "unit": "x base input price",
      "label": "Twelve-hour cache write multiplier",
      "source": "openai-caching",
      "quote": "rates",
      "match": "2.5"
    },
    "openaiShortMinutes": {
      "value": 30,
      "unit": "minutes",
      "label": "Default cache lifetime",
      "source": "openai-caching",
      "quote": "rates",
      "match": "30"
    },
    "openaiLongHours": {
      "value": 12,
      "unit": "hours",
      "label": "Long cache lifetime",
      "source": "openai-caching",
      "quote": "rates",
      "match": "12"
    },
    "openaiMinimumTokens": {
      "value": 1024,
      "unit": "tokens",
      "label": "GPT-6.2 Sol minimum cacheable visible prefix",
      "source": "openai-caching",
      "quote": "minimum",
      "match": "1,024"
    },
    "openaiShortContextLimit": {
      "value": 272000,
      "unit": "tokens",
      "label": "Short-context ceiling",
      "source": "openai-model",
      "quote": "context",
      "match": "272K"
    },
    "geminiInputPrice": {
      "value": 2,
      "unit": "USD per million tokens",
      "label": "Gemini lower-tier ordinary text input price",
      "source": "gemini-pricing",
      "quote": "input",
      "match": "$2.00"
    },
    "geminiReadPrice": {
      "value": 0.2,
      "unit": "USD per million tokens",
      "label": "Gemini lower-tier implicit cache read price",
      "source": "gemini-pricing",
      "quote": "read",
      "match": "$0.20"
    },
    "geminiShortContextLimit": {
      "value": 200000,
      "unit": "tokens",
      "label": "Gemini lower-tier prompt ceiling",
      "source": "gemini-pricing",
      "quote": "input",
      "match": "200k"
    },
    "geminiMinimumTokens": {
      "value": 4096,
      "unit": "tokens",
      "label": "Gemini implicit caching minimum",
      "source": "gemini-caching",
      "quote": "minimum",
      "match": "4,096"
    },
    "geminiBestEffortHours": {
      "value": 24,
      "unit": "hours",
      "label": "Gemini best-effort maximum implicit lifetime",
      "source": "gemini-caching",
      "quote": "maximum",
      "match": "24"
    },
    "tokensPerPriceUnit": {
      "value": 1000000,
      "unit": "tokens",
      "label": "Tokens per pricing unit",
      "source": "openai-pricing",
      "quote": "units",
      "match": "1M"
    }
  },
  "assumptions": {
    "prefixSizes": {
      "value": [
        10000,
        50000,
        100000
      ],
      "unit": "tokens",
      "label": "Eligible reusable prefix sizes",
      "basis": "Scenario prefixes span a short reference document through a large reference collection, above every selected cache floor and below every selected input price boundary."
    },
    "defaultPrefixTokens": {
      "value": 50000,
      "unit": "tokens",
      "label": "Worked-example reusable prefix",
      "basis": "The middle scenario size keeps the worked example readable while showing both write premiums and discounted reads."
    },
    "reuseCounts": {
      "value": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17,
        18,
        19,
        20
      ],
      "unit": "reuses after initial request",
      "label": "Successful reuse counts for the cost curve",
      "basis": "A cold initial request followed by fully successful repeated prefix reads. The range covers every selected break-even threshold and further repeated use."
    },
    "defaultRequests": {
      "value": 20,
      "unit": "requests",
      "label": "Requests in hit-share and cadence scenarios",
      "basis": "A fixed group of repeated requests separates initial write cost from later reads. Every group begins cold."
    },
    "followupHitShares": {
      "value": [
        0,
        0.25,
        0.5,
        0.75,
        1
      ],
      "unit": "share of follow-up requests",
      "label": "Assumed follow-up cache hit shares",
      "basis": "Evenly spaced stress cases from every follow-up missing to every follow-up hitting. These are chosen scenarios, not observed probabilities."
    },
    "requestGapsMinutes": {
      "value": [
        1,
        4,
        5,
        6,
        15,
        30,
        59,
        60,
        61
      ],
      "unit": "minutes between starts",
      "label": "Claude request-start spacing scenarios",
      "basis": "Chosen gaps bracket each Claude lifetime and its exact boundary, where expiry is assumed. The cadence model assumes every full read refreshes the selected lifetime, including the longer option; that longer refresh policy is a scenario assumption rather than a separately quoted guarantee."
    },
    "defaultGapMinutes": {
      "value": 4,
      "unit": "minutes between starts",
      "label": "Worked-example request spacing",
      "basis": "Follow-up requests start inside both Claude lifetimes. Response time is included in the interval between starts."
    },
    "defaultFollowupHitPercent": {
      "value": 100,
      "unit": "percent of follow-up requests",
      "label": "Calculator default follow-up hit share",
      "basis": "The default isolates ideal arithmetic by assuming every request after the cold initial request reads the full reusable prefix."
    },
    "calculatorMaxRequests": {
      "value": 1000,
      "unit": "requests",
      "label": "Calculator request-count maximum",
      "basis": "An interface bound for a repeated workload. It is not a provider rate limit or a request-volume prediction."
    },
    "confirmationRuns": {
      "value": 2,
      "unit": "runs",
      "label": "Requested synthetic confirmation calls",
      "basis": "A pair of identical prompts lets the study check recorded cache accounting if reuse occurs. It cannot establish a retention curve or reliable hit probability."
    }
  },
  "hero": {
    "chart": "reuse-cost",
    "alt": "Line chart comparing calculated cached-prefix input costs with ordinary input costs as successful prompt reuses increase."
  },
  "scope": [
    "Paid Standard text input prices only. Compare each model with its own ordinary uncached input, not with another model as a capability comparison.",
    "A reuse excludes the initial cold request. Saving means strictly lower cost; equality is not saving.",
    "Only the unchanged eligible prefix is priced. Output, changing suffixes, tools, hidden instructions, taxes, discounts and implementation work are excluded. Equal token counts across models are assumed, not equal text.",
    "Google coverage is implicit caching only. Its cold request uses ordinary input with no cache-write surcharge. Explicit caches and their storage fees are outside this study.",
    "Google implicit retention has no guaranteed window. The hit-share calculator is conditional; no Google hit is predicted from request spacing.",
    "Every chosen prefix exceeds all selected minimum lengths and stays below all selected price-tier ceilings. A real request must also keep its other input inside the selected tier.",
    "Claude spacing is between request starts, including response time. Assume exact identical eligible prefixes and no intervening invalidations. At or beyond the lifetime the scenario assumes expiry.",
    "There is no deterministic OpenAI cadence simulation: retention may exceed its documented minimum. Do not infer long-read refresh behavior from the documented short-read rule.",
    "Hit-share rows allow fractional expected counts across equivalent workloads. These are calculations from assumed shares, not observed counts or provider hit-rate forecasts.",
    "The Claude long-lifetime cadence curve assumes full reads renew that lifetime. The retained default-cache refresh quote is not a separate guarantee for long-cache refreshes; no cadence behavior was measured."
  ],
  "articlePlan": [
    "Lead with the first strictly cheaper count of successful reuses for every write option. Formula: initial write plus successful reads versus ordinary input for the initial request and all reuses.",
    "Use the reuse-cost line chart at the default prefix size and a distinct Claude cadence-cost chart over start-to-start gaps. Add rate and threshold, prompt-size and selected cadence tables.",
    "Distinguish the minimum read share among all requests from the assumed hit share among follow-ups. The initial request is always cold.",
    "Default the calculator to the short Claude option, the default prefix size and request count, with every follow-up hitting. Defaults reproduce the worked example.",
    "Include every plotted and tabulated scenario in CSV. Label inputs, assumptions and calculated figures separately. No invoice or latency claims.",
    "If the lane returns confirmation records, compare documented prices applied to recorded usage with the cost the client reported. Unless the TTL is known, show the short-to-long-write accounting range, not an exact default-TTL match.",
    "Run counts include client instructions. A successful cache read in a synthetic call does not establish an expiry curve, guaranteed hits, invoice charges or a production hit probability."
  ]
}
