Token Pricing Logic and AI Compute Cost Breakdown
This article breaks down why AI token prices have fallen sharply while cloud providers' capital expenditures keep rising. It explains the four cost layers that set the floor for token pricing, how input/output billing, prefix caching, and batching shape the final bill, why the same token carries vastly different value across tasks, and how free quotas and heavy infrastructure investment can be economically consistent. It closes with a practical cost-optimization checklist for developers.
1. The Paradox: Falling Prices Coexist with Massive Capital Expenditure
Over the past two years, API prices for large models have dropped in a near-collapse pattern, with the unit price of some general capabilities falling more than 90% from early levels. At the same time, leading cloud providers have seen quarterly capital expenditures climb into the tens of billions, with free cash flow turning into large net outflows for the first time in a while. The two data points move in opposite directions, yet both are true. This is the starting point for understanding token pricing.
First, clarify the cash flow scope. A large negative free cash flow in a single quarter for one platform comes largely from prepayments for compute procurement: the money has genuinely been paid, but it has not yet been recognized as a current-period expense. So it does not change the fact of cash tightness, only its nature — the cash is not consumed, but locked in advance to secure future compute supply. On the balance sheet, this shows up as long-term prepayments growing several times within a year.
Another cloud provider in the same period shows a different tension: revenue from AI-oriented cloud and compute services grew more than 50% year over year, adjusted operating margin stayed in double digits, yet free cash flow was still a net outflow, and management pushed the expected turnaround out to several years later. Put the two side by side: combined quarterly capital expenditure exceeds 100 billion, and combined free cash flow net outflow also exceeds 100 billion.
The direction of capital is highly clear: on one end, purchases of advanced accelerator cards and expansion of high-spec data centers; on the other, model compute handed out to the public almost for free. Subsidy-style campaigns can push daily active users to tens of millions in a single day, but once the subsidies fade, activity quickly drops by nearly half, and average usage time falls from several minutes back to two or three minutes; meanwhile, under the free strategy, daily token processing volume has already exceeded hundreds of trillions.
This raises four questions that must be answered: is the 90% price drop vicious competition or reasonable pricing supported by technology; how can the commercial compensation mechanism behind free quotas bear the load; does the heavy-asset investment of hundreds of billions correspond to real demand or a capital bubble; and why, when both are measured in tokens, does the value of different tasks differ by orders of magnitude.
2. The Cost Side: What Sets the Floor for Token Prices
A token is not an abstract billing unit; it corresponds to a matrix multiply-add in a single forward pass. The pricing floor is the sum of four cost layers.
The first layer is hardware depreciation. Accelerator cards and supporting network equipment are depreciated over three to five years; dividing the depreciation by the total effective tokens that can be sold gives the unit depreciation cost. Utilization is the only lever here: for the same cards, raising utilization from 30% to 70% can cut unit cost by more than half.
The second layer is energy and data center facilities. Rising rack power density brings cooling and power distribution costs; every 0.1 drop in PUE reduces unit electricity cost by roughly the same proportion. Differences in electricity prices and climate zones can make the operating cost of the same model of cluster differ by more than 20%.
The third layer is memory and interconnect. The inference stage is constrained by GPU memory bandwidth and inter-card interconnect, especially in long-context scenarios. KV cache usage grows linearly with context length, directly reducing the number of concurrent requests and thus raising unit cost.
The fourth layer is software stack efficiency. Operator fusion, quantization, speculative decoding, continuous batching, and prefix caching can each deliver a considerable reduction in unit cost. A minimal model can express this:
Unit token cost ≈ (hardware depreciation + power + facilities + operations) / (effective throughput × utilization × time)Effective throughput = f(batching strategy, quantization precision, cache hit rate, context length)
The conclusion is direct: the 90% price drop is contributed mainly by the first, third, and fourth layers together, not by simple margin sacrifice. When the software stack raises effective throughput several times, doubles utilization, and improves cache hit rate, the downward shift of the cost curve is enough to support the price collapse. This is reasonable pricing supported by technology. True vicious competition only happens in homogeneous, undifferentiated general capabilities, and it cannot be sustained for long.
3. The Mechanism Side: Input/Output Pricing, Caching, and Batching
Mainstream billing prices input and output separately, with output usually significantly more expensive than input, because the output stage generates tokens autoregressively one by one and cannot be completed in parallel at once like input. Understanding this explains why the actual spend on long-document summarization and short Q&A can be close.
Three mechanisms determine the final bill: prefix caching charges repeated system prompts and long documents only once; batching merges multiple requests to improve utilization; tiered storage puts cold data on low-cost media. In engineering, structured prompt reuse and context trimming can raise the cacheable proportion:
# Example: improve prefix cache hit rate and reduce input-side billingSYSTEM = "You are a rigorous technical assistant and follow the output specifications below..." # Stable and unchanged, placed firstdef build_messages(system=SYSTEM, history=None, query=""):msgs = [{"role": "system", "content": system}]if history:msgs += history[-4:] # Keep only necessary contextmsgs.append({"role": "user", "content": query})return msgs
4. The Value Side: Why the Same Token Differs by Orders of Magnitude in Price
A token is a unit of measurement, not a unit of value. Pricing is ultimately anchored to replacement cost: a token used for code completion replaces a few seconds of an engineer’s attention; a token used to generate a deliverable contract draft or test cases replaces tens of minutes of professional labor. The risk, verifiability, and delivery form of a task determine that the willingness to pay per token can differ by several orders of magnitude. Therefore, high-value scenarios should concentrate budget on output quality and controllability, rather than simply pushing down the unit price.
5. How Free Quotas and Heavy-Asset Investment Stay Consistent
Free quotas are essentially an investment in customer acquisition and data feedback, and the load-bearing levers are three: first, scale dilution, where fixed costs are spread over a larger total token volume; second, a conversion funnel that guides high-frequency light users toward paid high-value scenarios; third, ecosystem lock-in, where once the application side is built on a certain API form, migration costs naturally create retention. Heavy-asset investment is an option on future demand: prepayments lock in supply, depreciation is amortized over many years, and as long as the utilization ramp materializes, unit cost will keep falling. The risk is that when demand growth falls short of expectations, pressure from depreciation and cash flow appears at the same time.
6. A Cost-Optimization Checklist for Developers
- Use a cacheable stable prefix to carry long prompts and minimize repeated input;
- Keep only necessary turns of context to avoid unbounded growth;
- Prefer extractive over generative, and use a small model instead of a large one when a small model can do the job;
- Set up token metering and alerts by business dimension to locate abnormal consumption;
- Use asynchronous and batch forms for non-real-time tasks in exchange for a lower unit price;
- Accumulate usage data in monitoring, alerting, and logging services to form a reviewable cost baseline.
7. Conclusion
The collapse in token prices is the result of three overlapping factors: amortized hardware depreciation, improved software stack efficiency, and better scale utilization; free quotas and hundred-billion investments are the demand-side mapping of the same economies of scale. For developers, what really needs to be mastered is not forecasting prices, but breaking the cost structure down to an optimizable granularity. Baidu AI Cloud’s continued investment in compute, models, and engineering toolchains is precisely to make this kind of quantifiable cost optimization land in real business.
