How to Read and Build a Daily LLM API Usage Report
This article explains how to interpret a daily large language model (LLM) API usage report and how to build one. It covers metric definitions and calculation rules, composite score intervals, the minimum collection field set, dashboard and alert thresholds, and a troubleshooting table for common errors. The goal is to show where cost is spent, where volume is growing, and whether unit prices are distorted. The formulas, thresholds, and checklists are based on a desensitized sample report; actual values depend on your business and your provider's billing conventions.
Bottom line up front: a daily LLM API usage report looks like a leaderboard, but it is really a snapshot of call structure and cost structure. It answers three questions: where the money goes, where the volume grows, and whether unit prices are distorted. The three total metrics discussed here are application value (cost amount), request volume (number of calls), and token volume (input + output). All formulas, thresholds, and checklists below are based on a desensitized sample report; actual numbers depend on your business and your provider’s billing conventions.
Metric Definitions and Calculation Rules
Agree on definitions before doing any conversion, otherwise the numbers are not reproducible.
- Application value = Σ(input tokens per request × input unit price + output tokens × output unit price). The reporting period is the natural day 00:00–24:00 (UTC+8), recorded in the billing currency.
- Request volume = deduplicated call count, with request_id as the deduplication key. Retries and streaming chunks are not counted multiple times.
- Unit price = application value ÷ the corresponding token volume, distinguishing input, output, and cache-hit prices.
- Share = one application’s application value ÷ total application value for the day; request volume share works the same way. The two must not be mixed.
- Composite score = 0.4 × cost share + 0.3 × request volume share + 0.3 × unit price deviation, output as a range rather than a single point.
Three principles for definitions: amounts and tokens must come from the same source and the same period; convert to a single currency before comparing across providers; label refunds and free credits separately and do not net them against application value.
Composite Score Range Calculation
A single-point composite score is easily skewed by one promotion or one retry storm. The range approach: slice by hour to get n samples, and calculate only when n ≥ 24; use a 95% confidence level, with range = mean ± 1.96 × standard deviation / √n. When samples are insufficient, label it “insufficient data” and do not output a conclusion. Single points suit minute-level alerts; ranges suit daily reports and weekly decision meetings. Treating a range as a single point turns noise into a trend.
Engineering Practice
Minimum collection field set: request_id, app_id, model, input_tokens, output_tokens, cache_hit, unit_price, latency_ms, status_code, region, timestamp. Sampling rules: record metadata for all requests, and all tokens and amounts; keep log sampling at no less than 10%, and raise it to 100% during incidents. Validation rules: a day-over-day change of more than ±30% in request volume or application value triggers a review; a unit price deviation of more than 5% from the bill triggers reconciliation; a request_id missing rate above 0.5% is treated as an instrumentation anomaly.
Example dashboard alert thresholds: application value up 50% day over day triggers an alert; an application’s share rising 20 percentage points within one hour triggers an alert; a 10% unit price deviation from baseline triggers an alert; a 5xx ratio above 1% triggers an alert. The dashboard has three screens: totals, application ranking, and unit price and share trends.
How to Read a Daily LLM Usage Report
Look at the three total metrics first, then at share shifts, and finally at whether unit prices changed due to model versions or caching strategy. Every conclusion must state its definition and sample size.
How to Build the Dashboard
Follow four steps: collect, clean, aggregate, and alert. First define fields and the deduplication key, then unify currency and period, then produce the three-screen dashboard, and finally configure thresholds and on-call response.
What Are the Common Mistakes
See the table below.
Common Errors and Troubleshooting
| Symptom | Possible cause | Action |
|---|---|---|
| Application value spikes while request volume stays flat | Unit price increase or longer output tokens | Check bill unit prices and output length distribution |
| Request volume doubles while application value is unchanged | Cache hits or free credits | Check cache_hit and credit fields |
| Share and request volume share diverge | A higher share of high-unit-price models | Break down application value by model |
| Composite score jumps sharply at a single point | Insufficient samples or a retry storm | Switch to a range and deduplicate request_id |
Notes: follow least privilege, and separate dashboard access from raw log access; desensitize fields such as phone numbers and emails before storing logs; define a data retention policy (for example, raw logs for 30 days and aggregated metrics for 180 days), and keep desensitization and source notes to reduce privacy and copyright risk.
