300 Million Tokens for Just CNY 15: Is It a Billing Bug?

    A surprisingly low LLM bill does not necessarily indicate a metering error. This article explains how token pricing, cache hits, batch discounts, model routing, credits, and billing delays affect costs, then provides a step-by-step workflow and Python example for reconciling usage with charges.

    When estimating the cost of large language model applications, high usage paired with a small bill can easily lead to the wrong conclusion. A report of “300 million tokens processed for just CNY 15,” for example, immediately raises questions: Was some usage missed? Were only output tokens counted? Were cached tokens excluded? Has the full bill arrived yet?

    These are reasonable questions. Before calling it a bug, however, the more reliable approach is to break down the pricing model and reconcile it against itemized billing records.

    A charge this low could indicate a genuine metering problem. It could also reflect a combination of caching, batch processing, credits, model routing, and differences in how usage is reported. The following workflow helps distinguish between those possibilities.

    1. Understand What Makes Up a Token Bill

    Tokens are units produced by a model’s tokenizer—not characters or requests. A bill is therefore not necessarily calculated as “total tokens × one unit price.” Several factors may apply:

    • Input and output tokens may have different prices.
    • Prices may vary by model, context length, or task type.
    • Cached input tokens may be charged at a lower rate or reported separately.
    • Batch, offline, and asynchronous workloads may qualify for discounts.
    • Free allowances, credits, trial balances, and volume discounts can reduce the amount payable.
    • Whether failed, retried, or truncated requests are billable depends on the provider’s rules.
    • Usage may be aggregated hourly, daily, or by billing cycle, with reporting delays.
    • Taxes, currency conversions, unit conversions, and rounding may affect the final amount.

    Total token usage and the final charge alone are not enough to establish a billing bug. A more useful approximation is:

    1. Bill amount ≈ Σ(token usage by category × applicable unit price × discount factor)
    2. - credits + taxes

    Overlooking any of these components can substantially distort an estimate. A high cache-hit rate, extensive use of smaller models, significant credits, or an incomplete billing cycle could all explain a lower-than-expected charge.

    2. Common Reasons for a CNY 15 Charge

    The Estimate Uses the Wrong Pricing Basis

    A common shortcut is to multiply all tokens by the price of the most expensive model. Actual billing may instead separate input, output, cached input, and batch usage.

    If most of the 300 million tokens were cached input, or most requests were routed to less expensive models, the total could be much lower than that shortcut suggests. The problem may be an oversimplified estimate rather than underbilling.

    Cache Hits and Context Reuse

    Conversations, knowledge-base question answering, and code completion often reuse system prompts, fixed instructions, or long contexts.

    If a platform supports context caching or a similar mechanism, the reused portion may be billed at a lower rate. The difference can be substantial for long system prompts, fixed templates, and repeated questions over the same documents.

    Check whether the billing details distinguish cached input tokens from uncached input tokens.

    Batch, Offline, and Asynchronous Discounts

    Batch inference, offline processing, and asynchronous tasks prioritize throughput over immediate responses. They may therefore use different pricing from real-time requests.

    If the 300 million tokens mainly came from offline batch jobs, comparing the charge with standard online pricing can be misleading. Verify whether those jobs were assigned to a separate billing category.

    Free Allowances and Credits

    The amount charged is not necessarily the cost before credits. Free allowances, promotional credits, trial balances, and volume-based rebates may reduce the final payment.

    Review the undiscounted cost, discounts, credits, amount payable, and amount actually charged—not just the final total.

    Model Routing and Smaller Models

    An application may select models dynamically based on task complexity. Simple classification, extraction, and formatting tasks may go to smaller models, while more demanding reasoning tasks use larger models.

    If lower-priced models handle most tokens, the overall cost will fall. Check model identifiers, routing policies, and the distribution of tasks in request logs.

    Billing Delays and Misaligned Reporting Periods

    Usage dashboards and billing systems may update at different times. A display showing “300 million tokens for CNY 15” may include usage that has not yet been billed, or it may compare periods with different boundaries.

    Compare matching periods across multiple billing cycles and confirm whether the bill is finalized.

    Unit Conversions and Rounding

    One report may display usage in thousands of tokens while the pricing table lists rates per million tokens. Amounts may also be rounded to different levels of precision.

    Normalize units before comparing figures, and distinguish between raw usage, billable usage, and discounted charges.

    3. How to Determine Whether It Is Actually a Bug

    Follow a structured reconciliation process rather than starting with a disagreement over the total.

    Step 1: Retrieve Itemized Billing Records

    At minimum, check these fields where available:

    • Request timestamp
    • Model
    • Input tokens
    • Output tokens
    • Cached input tokens
    • Batch-processing indicator
    • Request status
    • Undiscounted cost
    • Discounts
    • Credits
    • Amount payable
    • Amount charged
    • Billing period

    Aggregate totals alone are not sufficient to locate a discrepancy.

    Step 2: Sample Requests and Recalculate Costs

    Select representative requests from application logs and recalculate their cost using the provider’s metering rules.

    The following Python code illustrates the reconciliation approach. It does not represent any particular platform’s pricing rules.

    1. def estimate_cost(
    2. input_tokens,
    3. output_tokens,
    4. input_price_per_million,
    5. output_price_per_million,
    6. cache_hit_ratio=0.0,
    7. cached_input_price_per_million=None,
    8. ):
    9. """
    10. Generic cost estimation example.
    11. Prices are per million tokens, for reconciliation purposes only.
    12. """
    13. cached_input = input_tokens * cache_hit_ratio
    14. uncached_input = input_tokens - cached_input
    15. if cached_input_price_per_million is None:
    16. cached_input_price_per_million = input_price_per_million
    17. input_cost = uncached_input / 1_000_000 * input_price_per_million
    18. cached_cost = cached_input / 1_000_000 * cached_input_price_per_million
    19. output_cost = output_tokens / 1_000_000 * output_price_per_million
    20. total = input_cost + cached_cost + output_cost
    21. return round(total, 6)
    22. def reconcile(bill_amount, estimated_amount, tolerance=0.05):
    23. diff = estimated_amount - bill_amount
    24. ratio = diff / estimated_amount if estimated_amount else 0
    25. return {
    26. "bill_amount": bill_amount,
    27. "estimated_amount": estimated_amount,
    28. "diff": round(diff, 6),
    29. "diff_ratio": round(ratio, 4),
    30. "within_tolerance": abs(ratio) <= tolerance,
    31. }
    32. estimated = estimate_cost(
    33. input_tokens=280_000_000,
    34. output_tokens=20_000_000,
    35. input_price_per_million=0.5,
    36. output_price_per_million=1.0,
    37. cache_hit_ratio=0.8,
    38. cached_input_price_per_million=0.1,
    39. )
    40. print(reconcile(bill_amount=15, estimated_amount=estimated))

    The important point is not the illustrative prices. It is that input tokens, output tokens, cache-hit ratios, and category-specific rates all affect the result. Use consistent currency units for prices and the bill amount.

    Ignoring caching or model routing can make legitimate cost reductions look like bugs. Conversely, an estimate that still differs from the bill requires further reconciliation; this example is not intended to prove that CNY 15 is the correct charge.

    Step 3: Check Request Parameters and Routing

    Review whether requests involve:

    • Prompt compression
    • Context truncation
    • Output-length limits
    • JSON-format constraints
    • Usage accounting across streaming chunks
    • Failed requests and retries

    Pay particular attention to whether failed retries are billable, how truncated requests are metered, and whether batch usage is aggregated separately. These details can explain differences between application logs and billing records.

    Step 4: Separate Discounts and Credits from Usage Charges

    Compare undiscounted cost, discounts, credits, and the actual charge separately.

    If the final charge is CNY 15 but the undiscounted cost is much higher, the difference may be financial rather than a metering issue. If the undiscounted cost is also unexpectedly low, continue investigating token counts and pricing categories.

    Step 5: Observe Multiple Cycles and Configure Alerts

    One unusual billing period is not enough to establish a persistent problem. Track several periods and monitor:

    • Daily token usage
    • Input-to-output token ratio
    • Cache-hit rate
    • Average unit cost
    • Request failure rate
    • Model distribution
    • Budget consumption rate

    Trigger alerts when these metrics deviate from their baselines, rather than relying only on the final bill amount.

    4. Manage Costs Beyond the Current Bill

    Even if the low charge is legitimate, temporary pricing or credits should not become the basis of a long-term cost model.

    A more resilient approach includes the following practices:

    1. Build a segmented cost model. Track tokens and spending by model, task, and business line.
    2. Improve cache reuse. Structure fixed system prompts, shared knowledge, and repeated context for reuse.
    3. Control output length. Use formatting constraints, output limits, and staged generation to reduce unnecessary output.
    4. Route tasks by complexity. Use smaller models for simpler work and escalate more demanding tasks.
    5. Batch suitable workloads. Schedule work that does not require immediate responses for offline or batch processing.
    6. Set budget alerts. Define daily, weekly, and monthly spending thresholds.
    7. Revalidate effective prices regularly. Reassess costs after price changes, credit expiration, or routing-policy updates.
    8. Retain reconciliation evidence. Keep traceable logs, itemized bills, request parameters, and calculation scripts.

    Conclusion

    “300 million tokens for just CNY 15” is not, by itself, evidence of a billing bug.

    First normalize units. Then reconcile input and output usage, cached tokens, model routing, batch discounts, free allowances, credits, and billing periods. Finally, use sampled request logs to reproduce the charges.

    If billable usage, unit prices, and undiscounted costs reconcile, the low charge may simply reflect discounts or reporting differences. If records are missing, billable usage differs substantially from logs, or discrepancies persist across multiple cycles, escalate the issue for a metering investigation.

    The practical goal is not merely to decide whether one bill was “too cheap.” It is to build a cost-management process that is observable, reproducible, and supported by alerts—so pricing changes and application growth do not become unexpected expenses.