Understanding AI Subscription Billing: How Prompt Caching Really Works
This article breaks down the economics behind large language model (LLM) subscription plans versus pay-as-you-go API pricing. It examines why subscription users can consume massive token counts, explains the technical mechanics of prompt caching, clarifies why cache reads are still billed, and provides a practical framework for developers to audit costs accurately without falling for misleading calculations.
Debunking the Myth: Sticker Price Gaps Don’t Equal Losses
A common observation in the AI subscription space goes something like this: a user pays a flat subscription fee, consumes a massive volume of tokens, and then someone calculates what those tokens would cost at public API rates—arriving at a number far exceeding the subscription price.
This calculation serves as an interesting starting point, but it cannot directly prove that providers are subsidizing users at a loss, nor can it support conclusions about profit margins.
The problem is that this approach mixes three distinct concepts:
- Cumulative user-side usage: The total input/output/cache-read volume the system records.
- Equivalent monetary value at public prices: A theoretical figure under a specific pricing scheme—not what the user actually pays.
- The provider’s actual service cost: This involves compute, memory, network, scheduling, power, and operations—none of which equal the public list price.
It’s particularly important to note that unverified personal bills, usage screenshots without clear statistical methodology, and extrapolations from a short observation window to long-term quotas are all insufficient evidence for claims that “subscription users cost the provider dozens of times their fee.”
The real question worth examining is: what actually constitutes these tokens? How much requires full computation, and how much comes from reusing existing context?
Why AI Coding Workflows Generate Massive Token Counts
In ordinary Q&A interactions, a user types a question and the model produces a single answer. AI-powered coding workflows are different: to complete a task, the system may repeatedly read requirements, code snippets, file contents, conversation history, and tool execution results.
Consider a task with a long shared context that triggers multiple reasoning rounds. Even if each round adds only a small amount of new information, the system may logically include the existing context in each round’s input.
A simplified relationship can express this:
Cumulative logical input = sum of context lengths referenced across all requests
This does not equal the total length of new user input, nor does it mean everything was fully recomputed from scratch each time.
For example, a shared prefix of 20,000 tokens referenced across 20 requests would, under per-request input accounting, accumulate to 400,000 tokens. Much of that content is unchanged and has the potential for intermediate-state reuse.
However, “potential for reuse” doesn’t guarantee cache hits. Whether the cache actually engages depends on service implementation, request organization, validity windows, resource state, and matching conditions. Developers cannot assume that just because text looks identical, subsequent requests will automatically be billed as cache reads.
What Prompt Caching Actually Caches
To understand the value of caching, you first need to distinguish two major phases in LLM inference:
1. Input Processing Phase
The model processes the input sequence and generates intermediate states needed for subsequent inference. For typical autoregressive models, this includes key and value states used in attention computations.
Longer inputs generally require more processing in this phase, though exact latency and cost depend on model architecture, hardware configuration, batching strategy, and inference implementation—not strictly linear scaling in all cases.
2. Token-by-Token Generation Phase
The model produces output incrementally based on the existing context. Output generation requires continuous computation and is affected by generation length, concurrent load, and memory access patterns.
The core value of prompt caching is avoiding repeated full processing of identical input prefixes when reuse conditions are met. What gets reused is the state available for subsequent computation—not simply returning a previous answer verbatim.
This means two mechanisms must be distinguished:
- Response caching: Directly returns a stored result when applicable.
- Prompt caching: Reuses input processing state, but can still generate different answers afterward.
This distinction explains why prompt caching can significantly reduce the computational overhead of repeated inputs, yet a cache hit does not mean the entire request costs zero resources.
Why Cache Reads Still Cost Money
“If it’s already been computed, why am I still being charged?” This is the core question behind the so-called “cache tax.”
From a technical standpoint, a cache is not a zero-cost warehouse. Cached states consume memory or other storage resources, require lifecycle management, access isolation, and lookup/read operations on subsequent requests. When generating new content, the model still uses these states for computation.
So a cache hit typically means reduced redundant processing, not eliminated resource consumption.
From a commercial pricing perspective, service prices don’t necessarily map one-to-one to any single marginal cost. Cache read fees may reflect resource occupancy, capacity management, and overall pricing strategy. Whether it’s worthwhile depends on price rules, hit rates, performance metrics, and actual task value.
“Cache tax” works as a discussion metaphor, but it shouldn’t be treated as a proven technical conclusion. The fact that cache reads are still billed doesn’t prove the provider isn’t incurring costs; conversely, the existence of cache costs doesn’t automatically justify any charging level.
Building a Correct Billing Model Instead of Lump-Sum Token Math
When analyzing inference costs, at least these categories should be distinguished:
- Standard input: Input billed at the regular input rate without cache-read pricing.
- Cache write: Billed items that establish a cache for future reuse; whether this is itemized and how it’s priced depends on service-specific rules.
- Cache read: Input billed at the cache-read rate after a successful cache hit.
- Output: Generated content billed according to service rules.
A useful general-purpose model for analysis:
Total cost= Standard input volume × standard input rate+ Cache write volume × cache write rate+ Cache read volume × cache read rate+ Output volume × output rate+ Other applicable fees
Each quantity must be classified according to actual bill definitions, avoiding counting the same input portion in multiple mutually exclusive categories. Some services don’t itemize every component, so this is an analytical framework rather than a universal product rule.
Consider a scenario: a service records 100 million tokens of input, of which 90 million are cache reads and 10 million are standard input. If all input is multiplied by the standard input rate, the API-equivalent cost will typically be overestimated.
Conversely, if a request contains significant repeated text but misses the cache due to prefix changes or invalidation, estimating costs at an ideal hit rate will underestimate actual charges.
“Total token count” is therefore just a rough scale indicator—it cannot independently explain the size of a bill.
Why Subscriptions and Pay-as-You-Go Can’t Be Directly Compared
Subscriptions and metered API calls are different delivery models with different usage conditions. Direct comparison is rarely apples-to-apples:
1. Subscriptions May Not Be Fixed Token Packs
A flat fee typically corresponds to some form of usage entitlement, potentially subject to usage windows, request frequency, concurrency limits, model availability, or other constraints. Specific limits should follow official terms—observations from a short period shouldn’t be treated as guaranteed perpetual quotas.
2. Providers Serve User Populations, Not Individual Extremes
Usage frequency and task complexity vary widely across users. The consumption of a few high-frequency users doesn’t represent the average. Analyzing subscription economics requires looking at the full user population’s payment distribution and service cost.
3. Service Conditions May Differ Across Channels
Metered APIs and interactive subscription products may differ in integration methods, automation permissions, concurrency capabilities, service guarantees, or management features. Equivalent price comparisons are only meaningful when the compared conditions are confirmed to be equivalent.
4. Retail Price Is Not Internal Cost
Converting metered prices to subscription usage value produces a retail-price comparison, not a cost analysis. It can neither independently prove provider losses nor prove windfall profits from caching.
How Developers Can Conduct a Reliable Cost Audit
Step 1: Define the Audit Boundary
Clarify the statistical period, model category, task type, call channel, and whether retries are included. Mixing multiple models, price periods, or channels makes usage totals impossible to interpret.
Step 2: Record Verifiable Usage Fields
Within what the service actually exposes, record standard input, cache-related input, output, request timestamps, and billed amounts. For fields not exposed, mark them as unknown rather than filling in “certainly cached.”
Step 3: Correlate Bills with Task Outcomes
Judging by single-request price alone is misleading. A cheap call that produces an incorrect edit, requiring repeated corrections downstream, may cost more overall.
More meaningful metrics include:
- Total cost per completed task
- Total requests required to complete a task
- Extra consumption from failures and retries
- Completion time per task
- Percentage of outputs requiring manual correction
Step 4: Observe Cold Starts vs. Repeated Requests Separately
First-time requests and subsequent repeated requests may have very different input processing characteristics. Testing should keep task conditions as consistent as possible and record whether the cache actually hits—rather than comparing one incidental speed difference.
Step 5: Review Billing Discrepancies
If internal estimates don’t match the bill, check billing units, category double-counting, hidden retries, and pricing rule changes. Don’t immediately attribute differences to “cache invalidation” or “billing anomalies.”
How to Optimize Context for Real Cache Benefits
1. Put Stable Content First, Dynamic Content Last
For cache mechanisms that rely on prefix matching, place stable task rules and public background at the front, with this round’s questions and variable information at the end—provided this arrangement doesn’t compromise the model’s understanding of instruction priority or task semantics.
2. Reduce Meaningless Prefix Variation
Frequently varying timestamps, random identifiers, or unrelated state embedded in the common prefix can hurt reuse. However, content involving permissions, security boundaries, or required audit trails shouldn’t be omitted just to improve hit rates.
3. Reduce Redundancy First, Then Aim for Discounts
A lower cache price doesn’t justify unlimited history retention. Excessively long contexts still consume resources and may introduce stale information, conflicting constraints, or retrieval noise.
Task summaries, relevant-snippet filtering, and periodic context consolidation can help—but preserve the key conditions that affect correctness.
4. Control Unproductive Output
Caching mainly optimizes repeated input; it doesn’t replace output-length management. For well-defined tasks, require necessary and sufficient results, and minimize unnecessary explanations or repetitive generation.
5. Don’t Use High-Frequency “Keep-Alive” Requests as a Substitute for Cost Analysis
If caches have validity windows, sending extra requests may not reduce total costs. Such strategies are only worth considering when official rules permit them, the business genuinely needs them, and the overall net benefit is positive.
Enterprises Must Also Consider Cache Data Boundaries
Caching isn’t just a pricing issue—it’s a data governance issue.
When handling sensitive code, customer data, or internal documents, verify the cache’s data scope, retention policy, access isolation, and deletion mechanisms. Never assume that content is exempt from security management just because it’s “just intermediate state.”
If you build your own application-level cache, access control must be incorporated into cache keys or validation flows to prevent incorrect reuse of restricted results across users or tenants. When the underlying service’s caching behavior isn’t visible, assess risks based on official data-processing documentation and contractual requirements—not unverified assumptions.
Conclusion: What Matters Is the Task-Level Cost, Not Token Myths
The contrast between massive token consumption and low subscription fees is worth analyzing, but the answer can’t stop at “the provider is running a charity” or “cache billing is pure profit.”
Repeated contexts inflate cumulative usage; cache reuse changes compute structure; differentiated pricing changes equivalent bills; subscription restrictions and usage distribution affect overall economics. These factors must be analyzed independently.
For developers and enterprises, the most valuable objective isn’t to produce an eye-popping theoretical number—it’s to continuously reduce the real cost per successful task while meeting quality, security, and delivery requirements.
