OpenAI Prompt Caching: How Many Reuses Make It Worthwhile? The Break-Even Thresholds for 2 and 3 Reuses Explained

Direct answer: under ideal conditions, OpenAI’s default 30-minute prompt caching is already cheaper than no caching from the 2nd use onward, while 12-hour caching only becomes worthwhile at the 3rd use. The ideal conditions here are: the same fixed prefix is fully written to cache once, all subsequent requests hit it, and there are no repeated writes in between. Based on official pricing for the gpt-6-luna standard short-context tier, when a 10,000-Token fixed prefix is used 10 times total, 30-minute caching saves about 78.5% versus no caching, and 12-hour caching saves about 66%. But that’s only the accounting for the fixed prefix portion — it doesn’t mean the entire request gets a discount.

What you’ll learn from this article:

  • The real conditions for a prompt cache hit, and how they differ from “semantic similarity.”
  • How the two write rates — 30-minute and 12-hour — are priced, and why the standard input fee can’t be stacked on top.
  • A verifiable set of worked examples for 1, 2, 3, and 10 uses, plus a break-even formula that works for any prefix length.
  • What these rules mean for developers designing prompt structure and scheduling batch jobs.

Index: Start with a concept table and a quick impact overview to align terminology and affected groups; the “Objective Facts” section lays out the caching rules, prices, and worked-example data from the official docs; the “Analysis and Judgment” section explains the math behind the break-even line and discusses prompt structure, batch scheduling, and common misconceptions.

openai-prompt-caching-break-even-reuse-count-en-image-0

OpenAI Prompt Caching 101: Concept Overview

Concept Brief explanation
Prompt Caching OpenAI caches repeated prompt prefixes. When a later request hits the cache, it’s billed at the lower “cache read” price.
Prompt prefix The continuous content from the very start of a request’s input. Cache matching looks for an identical prefix, not something with a similar meaning.
Counted input tokens Input tokens that count toward the cache threshold. GPT-5.6 and later models require at least 1,024 of them before caching is available.
Cache write The charge when a prefix is first stored in the cache. It’s priced as a multiple of the regular input rate and is a single all-in write rate.
Cache read The charge when a later request hits the cache. The price is far lower than regular input.
30-minute / 12-hour cache Two cache validity tiers. The default is 30 minutes; the 12-hour tier is available in the Responses API and costs more to write.
Standard processing tier The standard tier in the official price table. Different processing tiers have different prices and can’t be mixed.
Short context tier The official price table separates tiers by context length. This article only uses short-context pricing.

OpenAI Prompt Caching Impact at a Glance

  • API developers: Whether caching saves money depends on how many times you reuse the prefix and your hit rate within the validity window — not on “turning it on.” With the 30-minute tier, two total uses (the initial write plus one hit) are already cheaper than no caching. The 12-hour tier costs more to write, so it needs more reuse to pay off.
  • Teams building agents or long system prompts: Put fixed rules, tool descriptions, and long documents up front, and put changing content later so the prefix hits reliably. This is a structural design issue, not a parameter issue.
  • Teams running batch jobs: Send requests that share the same prefix within the cache’s validity window to significantly improve hit rates. If the work is spread across the whole day, evaluate whether the 12-hour tier is worth it.
  • People responsible for cost accounting: Caching only affects the input cost for the fixed prefix. Output, newly added content, tool calls, and retries aren’t included, so you can’t apply the cache savings percentage directly to your total bill in a budget spreadsheet.

OpenAI Prompt Caching: The Facts

Sources and Timeliness

The information in this article was checked on 2026-11-17 against documentation that OpenAI continually maintains: the prompt caching guide at developers.openai.com/api/docs/guides/prompt-caching and the pricing page at developers.openai.com/api/docs/pricing.md. These docs can change at any time. We haven’t verified when the relevant rules were first published, so this isn’t breaking news—it’s a summary and breakdown of the rules as they currently stand.

How prompt caching hits work

Prompt caching in OpenAI matches on identical prompt prefixes. Two prompts can mean almost the same thing, but if their opening content differs, they won’t hit the cache. This isn’t a semantic similarity lookup. That means a single character change in the prefix—say, adding the current time at the start of a system prompt—can make everything after it miss the cache entirely.

For GPT-5.6 and later models, the caching threshold is at least 1,024 visible input tokens. Older models follow different rules. The pricing and threshold takeaways in this article apply only to the new rules described in the official docs, and you can’t just carry them over to older models.

Two cache write rate tiers

Cache tier Write rate (relative to regular input) Notes
30 minutes (default) 1.25x Default cache lifetime
12 hours 2.5x Available in the Responses API

The official docs are clear that both multipliers are total write rates: you’re billed at that rate on the first write, and there’s no extra regular input charge layered on top. One more thing to keep in mind: 12 hours refers to the cache lifetime, not a data deletion deadline. Don’t conflate the two.

gpt-6-luna Official Pricing

Below are the prices for gpt-6-luna on OpenAI’s official pricing page, under the Standard processing tier and Short context tier, per million tokens. These prices don’t apply to the long-context tier or other processing tiers, and they aren’t quotes from any third-party platform.

Billing item Price (USD / million tokens)
Regular input $0.10
Output $0.50
Cache read $0.01
30-minute cache write $0.125
12-hour cache write $0.25

As you can see, the 30-minute write price of $0.125 is exactly 1.25× regular input, and the 12-hour write price of $0.25 is 2.5×, matching the multiplier rules in the docs. Cache reads cost only one-tenth of regular input.

Reuse Count Examples

The examples below are theoretical calculations derived from official prices, not actual measurements. Assumptions: a fixed prefix of 10,000 billable tokens, fully written to cache on first use, then a cache hit every subsequent time, with no repeated writes in between.

Total uses No cache 30-minute cache 12-hour cache
1 use $0.001 $0.00125 $0.0025
2 uses $0.002 $0.00135 $0.0026
3 uses $0.003 $0.00145 $0.0027
10 uses $0.010 $0.00215 $0.0034

Under these assumptions, the 30-minute cache becomes cheaper than no cache starting from the 2nd total use, and the 12-hour cache becomes cheaper starting from the 3rd. If you use it only once, both cache options are more expensive than no cache, because you pay the write premium without getting the read discount.

openai-prompt-caching-break-even-reuse-count-en-image-1

Scope of the Worked Example

These figures account only for the fixed prefix. New material added to each request, model outputs, tool calls, and failed retries all fall outside the calculation, so this isn’t a discount on the entire request. If the interval between two uses exceeds the cache TTL, later requests can no longer be counted as a “full cache hit”—you’ll need to add the cost of rewriting the cache back in.

OpenAI Prompt Caching Analysis: Key Takeaways

Why the Break-Even Threshold Lands at 2 and 3 Uses

Generalizing the worked example to any number of uses N, we can write three cost lines (in USD per million prefix tokens):

  • No caching: 0.10 × N
  • 30-minute cache: 0.125 + 0.01 × (N − 1)
  • 12-hour cache: 0.25 + 0.01 × (N − 1)

To find the break-even point, set the cache cost below the no-cache cost. The 30-minute tier needs N to be greater than about 1.28, meaning it pays off from the 2nd use onward. The 12-hour tier needs N to be greater than about 2.67, meaning it pays off from the 3rd use onward. This conclusion doesn’t depend on prefix length, because all three cost lines scale proportionally with token count. Switch the prefix from 2000 tokens to 50000 tokens and the break-even use count stays the same—only the absolute amount saved changes. The catch is that the prefix has to meet the 1024-token threshold and the price tiers have to stay consistent.

Structurally, the write premium is a one-time cost, and the saving from each hit is the gap between the regular input price and the cache-read price—$0.09 saved per million tokens. The 30-minute tier’s premium is just $0.025, so a single hit covers it. The 12-hour tier’s premium is $0.15, so it takes two hits to cover. That’s why the two break-even thresholds differ by one use.

A Reusable Break-Even Calculation Script

The script below reproduces the worked examples under this article’s assumptions. You can swap in your own prices and usage counts to quickly evaluate your scenario. For price parameters, use the latest values on the official pricing page.

# Based on official gpt-6-luna Standard / Short context prices (USD / million tokens)
INPUT = 0.10
CACHE_READ = 0.01
WRITE = {"30min": 0.125, "12h": 0.25}

def prefix_cost(prefix_tokens: int, uses: int, mode: str | None) -> float:
    """Calculate only the fixed prefix cost; assumes a full write on the first use, all subsequent uses are cache hits, and there are no repeated writes"""
    m = prefix_tokens / 1_000_000
    if mode is None:
        return INPUT * uses * m
    return (WRITE[mode] + CACHE_READ * (uses - 1)) * m

for n in (1, 2, 3, 10):
    base = prefix_cost(10_000, n, None)
    c30 = prefix_cost(10_000, n, "30min")
    c12 = prefix_cost(10_000, n, "12h")
    print(f"{n:>2} 次  不缓存 ${base:.5f}  30分钟 ${c30:.5f}  12小时 ${c12:.5f}")

The output matches the worked-example table above. If in your actual situation some requests miss the cache, you can treat the misses as “rewrites,” and the break-even point will shift accordingly.

Prompt structure matters more than the toggle

Since the cache only recognizes an exactly identical prefix, the order in which you arrange your prompt directly determines your hit rate. The safer approach is to put your fixed system rules, role definitions, tool definitions, and reference documents at the very front, and to put the user question, retrieved results, timestamps, and any other material that changes every time at the end. Once a field that changes sneaks into the start of the prefix, none of the fixed content after it—no matter how long—can be reused.

openai-prompt-caching-break-even-reuse-count-en-image-2

There’s another common misconception worth calling out on its own: padding your prompt with irrelevant content just to hit the 1024-token threshold doesn’t pay off. The padding tokens are billed at the write price the first time, then billed at the cache-read price every time after—and they can also get in the way of the model’s understanding of the actual instructions. The point of the threshold is to show that short prompts simply don’t need caching, not to encourage making short prompts longer.

Batch scheduling determines whether you’ll “hit every time”

Another key assumption in the worked example is that all subsequent requests hit the cache. In reality, if requests with the same prefix are scattered throughout the day, the 30-minute tier will likely expire between two requests, forcing a rewrite every time — which ends up costing more than no caching at all. There are two approaches here: one is to group similar tasks into batches and send them back-to-back within 30 minutes; the other is to evaluate the 12-hour tier, trading a higher one-time write cost for a longer validity period.

You can reduce the choice to a rule of thumb: if requests are dense with short gaps, use the default 30-minute tier — just 2 total uses is enough to make it cheaper than no caching; if requests are sparse but you’ll reuse the same prefix repeatedly within the same day, and total uses can reliably reach 3 or more, the 12-hour tier makes sense. If a prefix is likely to be used only once during its validity window, not caching is actually the cheapest option.

The part of cost accounting that’s easy to overestimate

The eye-catching figure of about 78.5% savings over 10 uses applies only to the input cost of the fixed prefix. In gpt-6-luna’s pricing structure, output costs 5 times as much as regular input, so if an app produces very long outputs, or every request comes with a lot of newly retrieved material, the money saved by prefix caching may not account for much of the total bill. A more sensible way to budget is to split requests into “fixed prefix,” “dynamic input,” “output,” and “tools and retries” and estimate each separately, applying the caching formula only to the first part.

In addition, the write multiplier rules described in this article apply to GPT-5.6 and later models; the specific prices in the example correspond only to gpt-6-luna’s Standard processing tier and Short context tier. If you switch to an older model, the long-context tier, or another processing tier, you’ll need to look up the prices again and recalculate — the break-even number of uses may change too. The official docs are continuously maintained, so if the rules are adjusted later, the conclusions should defer to the docs at that time. That’s a variable to keep watching, not a change that has already happened.

Xunzi wrote in “Encouraging Learning”: “Pile up earth to make a mountain, and wind and rain will arise; gather water to make a pool, and dragons will appear.” The same goes for the accounting of prompt caching: a single write is just a cost; the real savings come from steady reuse again and again within the validity period.

Leave a Comment