On-Demand vs. Subscription Pricing for LLM Services: A Cost Comparison
On-demand (pay-as-you-go) and subscription-based pricing are the two most common billing models for large language model services. On-demand charges based on actual consumption, making it suitable for workloads with fluctuating usage or those still in an exploratory phase. Subscriptions prepay for periodic quotas, credits, or resource packages, fitting stable and predictable workloads. When comparing the two, simply putting two "average unit prices" side by side is misleading, because metering conventions, quota utilization, failed retries, and stability all affect the final cost. This article uses a set of anonymized real-world measurements as a starting point and distills a reusable cost evaluation methodology.
Background: Why “Average Unit Price” Is Misleading
In the sample data, the on-demand side consumed ¥31.53 for 296 million tokens over roughly 25 days, which works out to about ¥0.106 per million tokens. The subscription side ran on a ¥118 package for one hour, consuming 964 credits and 24.26 million tokens. Based on the package’s total quota of 40,000 credits, this translates to roughly ¥0.117 per million tokens. At face value, the subscription’s effective unit price is slightly higher than on-demand.
But this conclusion rests on at least three assumptions. First, the conversion ratio between subscription credits and actual tokens stays stable throughout the billing period. Second, the total quota will eventually be fully used. Third, failed requests, timeout retries, and manual waiting do not significantly inflate costs. If any of these assumptions fails, the nominal unit price no longer represents the effective cost.
Therefore, cost comparison should focus on the total cost of completing valid tasks, not on the average token price over a particular time window.
Cost Formulas for the Two Billing Models
The unit cost under on-demand billing can be written as:
# On-demand: cost per million tokenscost_per_million = paid_amount / (consumed_tokens / 1_000_000)
For subscription billing, you need to distinguish between “marginal converted cost” and “actual amortized cost.” Let the package price be P, the total quota be Q, the credits consumed in the current period be q, and the corresponding token consumption be M million tokens. The marginal converted cost is:
# Package marginal conversion: assumes the quota will eventually be fully usedpackage_marginal = (P * q / Q) / M
If only q_total credits are consumed by the end of the period and Q is not exhausted, the actual amortized cost is:
# Package actual amortization: when quota is not fully used, the prepaid fee is borne by actual consumptionpackage_actual = P / (used_tokens / 1_000_000)
The difference between the two is exactly the “sunk quota cost.” The ¥0.117 per million tokens in the example reflects the marginal conversion view, which implicitly assumes full quota utilization. If only part of the quota is used within the period, the actual unit price will be higher.
Stability can also be folded into effective cost:
def effective_cost(paid, valid_tokens_million, failure_rate, retry_factor=1.0):"""failure_rate: failure rate, 0 to 1retry_factor: token amplification factor from extra retries"""nominal = paid / valid_tokens_millionretry_amplification = 1.0 / max(1e-9, (1.0 - failure_rate))return nominal * retry_amplification * retry_factor
This formula captures a simple fact: with a high failure rate, even a lower nominal unit price can result in higher token consumption and cost for the same amount of valid work.
Revisiting the Sample Data: A Slightly Higher Package Price Doesn’t Mean Packages Are Worthless
Reviewing the anonymized sample: the on-demand side comes to about ¥0.106 per million tokens, while the subscription side’s marginal conversion is about ¥0.117 per million tokens—roughly 10% higher. If the workload only runs for a short time and the quota goes unused, the package’s actual unit price would be even higher. Only when the quota is fully utilized within the period does the marginal unit price become a meaningful reference.
But packages shouldn’t be judged on unit price alone. Periodic quotas often come with differences in concurrency entitlements, rate limits, and quota management. Higher-tier packages typically offer lower per-credit costs as quota scales up, but this advantage has a boundary: a higher tier is only more cost-effective when utilization exceeds the break-even point and stability meets business requirements.
The break-even point can be expressed as a threshold. Let the on-demand unit price be c, the package price be P, and each credit be redeemable for k million tokens. The minimum credits q_min that must be consumed within the period for the package to break even is:
def break_even_quota(price, on_demand_cost_per_million, million_per_quota):# Package actual cost = price / (q * million_per_quota)# Requirement: <= on_demand_cost_per_millionreturn price / (on_demand_cost_per_million * million_per_quota)
If actual credit consumption in the period falls below q_min, the package is not worthwhile. Only when consumption exceeds q_min and the quota can be fully used does the package gain a cost advantage. Higher-tier packages should be evaluated against the same threshold, not just their sticker price.
How Instability Becomes a Hidden Cost
The original observation noted that package plans may be less stable. Stability differences never appear directly in the unit price, but they inflate costs through several paths:
- Failed retries: If failed requests consume tokens, retries directly increase costs; even when unbilled, they add queue time.
- Timeouts and rate limiting: Rate limits at peak times cause task backlogs, reducing throughput per unit of time and indirectly raising labor and scheduling costs.
- Output quality variance: If results require manual review or repeated corrections, the effective token cost rises significantly.
- Quota burn rate: Under unstable conditions, rapid retries in a short window can quickly drain package quota, distorting the marginal conversion.
Therefore, it is recommended to monitor request success rate, retry rate, timeout rate, P95 latency, token consumption per task, and package quota burn rate. Cost dashboards should put “spend” and “valid output” side by side, rather than tracking only the bill amount.
Engineering Recommendations for Plan Selection
First, tier tasks by criticality. Core online paths should prioritize stability and predictable latency, while non-critical batch processing can try low-cost packages or on-demand billing. Second, start with a small-scale canary rollout, then scale up gradually while recording per-task cost and failure rate. Third, set budget and quota alerts to prevent anomalous tasks from rapidly draining package quota early in the billing period. Fourth, establish a “utilization” metric for packages: when utilization is low, on-demand is more flexible; when utilization is high and quota can be fully used, consider a higher tier. Fifth, keep fallback and switching strategies in place, implemented through generic scheduling and monitoring capabilities, to avoid locking the business into a single billing model.
Conclusion
The anonymized sample shows that a package’s marginal converted unit price may be slightly higher than on-demand, but this conclusion depends on full quota utilization and stability assumptions. Higher-tier packages are usually more cost-effective when quota scales up and utilization exceeds the break-even point, but insufficient stability erodes that advantage through retries, rate limiting, and manual review. The more rigorous approach is to standardize token metering, compute both marginal and actual amortized costs, factor in failure rates and retry amplification, and then combine task tiering with monitoring and alerting for continuous evaluation. Only by converting “nominal unit price” into “effective task cost” does comparing billing models become genuinely useful for engineering decisions.
