How to Build a Fair Meter for LLM API Relay and Aggregation Services

    This article explains why low prices on LLM API relay and aggregation platforms often hide an opaque metering system, and breaks down three core risks: account pool routing, credit multipliers, and model substitution. It then outlines five design principles for a fair meter and shows how to implement unified usage collection, bill recomputation with variance attribution, and model consistency checks, followed by procurement and governance recommendations.

    1. Background: The Metering Black Box Behind Low Prices

    In API relay and aggregation scenarios, it is common to see model services priced well below the official public rates. For example, a model may have official pricing that distinguishes off-peak and peak hours per million tokens, while a relay provider quotes only one-third to one-half of that price, sometimes packaged as “credits” or “quota bundles.” The price gap itself is not the problem. The problem is opaque metering: how credits convert to tokens, how input, output, and cache hits are priced separately, and how peak and off-peak windows are defined are often left without written documentation.

    When metering rules cannot be verified, buyers take on three hidden risks: account quota may not match actual availability; the model version served may differ from the one advertised; and it may be unclear how rate limits, retries, and failed requests are billed. Removing these risks requires a “fair meter”—a reproducible, reconcilable, and auditable metering and verification mechanism.

    2. Technical Breakdown of the Three Core Risks

    2.1 Account Pools: Uncertainty from Multi-Account Rotation

    An account pool means the provider combines multiple upstream accounts or keys into a resource pool and distributes requests through round-robin, weighting, or least-connections strategies. The technical impact includes:

    • Fragmented quota: The quota available to a single request depends on the remaining quota of whichever account is hit, showing up as inconsistent speed and intermittent availability.
    • Context drift: Without sticky routing, turns in a multi-turn conversation may land on different accounts, lowering cache hit rates and increasing costs.
    • Missing observability: Callers cannot see the real upstream identifier, so incident diagnosis relies on inferring from timestamps and response characteristics.

    2.2 Multipliers: The Credit System Hides the Real Unit Price

    A multiplier is essentially a conversion factor between the billing unit and the baseline unit. When a service bills in credits, the real unit price is buried in the conversion formula:

    1. real unit price (CNY per million tokens) = credit price (CNY per credit) × credits consumed per million tokens

    If any one of these terms is not disclosed, buyers cannot compare prices across providers or verify bills. More subtle are tiered multipliers: input, output, cache hits, and long context each use different factors. If no estimate is provided before the call, costs can spike sharply in long-text scenarios.

    2.3 Model Substitution: Capability Equivalence Cannot Be Self-Proven

    A mismatch between the advertised model and the model that actually responds usually appears as routing to a smaller parameter size, a quantized version, or a distilled version. Technically, this can be partially identified through response metadata, log fingerprints, and behavioral consistency, but only if the provider is willing to expose verifiable fields.

    3. Design Principles for a Fair Meter

    1. Define the metering standard first: Set the metering unit and tiering rules before discussing price.
    2. Two-way verifiability: Callers must be able to calculate, providers must be able to recheck, and differences must be attributable.
    3. No charge for failures: Timeouts, rate limits, upstream errors, and content blocks should not count as valid usage.
    4. Cache billed separately: Cache hits and misses must be metered and displayed separately.
    5. Auditable trail: Request identifiers, time windows, and billing snapshots must be traceable.

    4. Implementation: Metering and Reconciliation

    4.1 Unified Usage Collection

    Instrument the client or gateway to record a standardized usage structure for each call:

    1. {
    2. "request_id": "req-20260101-0001",
    3. "ts": "2026-01-01T10:00:00Z",
    4. "model_declared": "general-chat-large",
    5. "model_returned": "general-chat-large",
    6. "prompt_tokens": 1200,
    7. "completion_tokens": 350,
    8. "cached_tokens": 800,
    9. "tier": "peak",
    10. "status": "ok"
    11. }

    4.2 Bill Recomputation and Variance Attribution

    1. def recompute(entry, price_table):
    2. if entry["status"] != "ok":
    3. return 0.0
    4. p = price_table[entry["model_declared"]][entry["tier"]]
    5. billable_in = entry["prompt_tokens"] - entry["cached_tokens"]
    6. cost = (billable_in * p["input"]
    7. + entry["cached_tokens"] * p["cache"]
    8. + entry["completion_tokens"] * p["output"])
    9. return cost / 1_000_000

    Compare the recompute result against the provider’s bill entry by entry, and attribute differences to four categories: unit price difference, usage difference, tier difference, and failure billing. This produces a monthly reconciliation report.

    4.3 Model Consistency Checks

    • Metadata check: Compare the model identifier returned in the response with the advertised one.
    • Behavioral baseline: Periodically sample a fixed prompt set and compare output distributions and latency characteristics for sudden changes.
    • Capability probes: Run a minimal, decidable capability test set to detect obvious downgrades.

    5. Procurement and Governance Recommendations

    • Specify the metering unit, tiered multipliers, cache rules, and failure billing terms in the contract.
    • Require per-request usage details and verifiable billing snapshots.
    • Establish canary testing and automatic switching across multiple providers to avoid single-point dependency.
    • Combine logs, monitoring alerts, and object storage archiving to form a complete audit trail.

    6. Conclusion

    Low price does not mean low cost. Only when the scheduling rules of account pools, the conversion formulas of multipliers, and the consistency evidence of models are all placed on the “fair meter” does a relay service have a sustainable technical and commercial foundation. For users, building metering first and negotiating discounts second is the controllable path to usage governance.