Large Language Model Tiered Services and API Metering Architecture: A Practical Guide

    This article breaks down how to design a tiered service and billing architecture for large language models (LLMs). It abstracts common delivery models into three channels—free, subscription, and pay-as-you-go API—and two billing types, then walks through a five-layer architecture covering the gateway, model routing, inference, governance, and observability. You will find practical guidance on multi-tenant quota governance, metering consistency and explainable billing, inference cost control, availability and graceful degradation, security and compliance, SLO design, and an eight-week rollout roadmap.

    1. Introduction: Model Release Cadence Is Not the Real Barrier to Serving

    Public industry information shows a clear timeline: a leading LLM team has open-sourced a series of models since 2025, released a new flagship model in July 2026 alongside a funding round of over $3.5 billion at a $35 billion post-money valuation, and then started a new round that raised the pre-money valuation to $50 billion; an enhanced version followed in October of the same year, and at the company level there is an evaluation of a potential first-half-2027 listing on the Hong Kong stock market. Capital and model iteration cycles draw attention, but for developers and enterprise users, what really determines whether a deployment succeeds is not “what model was released next,” but whether these model capabilities can be delivered as online services in a stable, measurable, and governable way.

    The operating model is also representative: basic capabilities are free, three membership tiers at 49, 99, and 199 yuan per month were introduced starting September 2024, and the open platform offers pay-as-you-go APIs; starting July 20, 2026, subscriptions for new consumer users were paused. This combination of “free acquisition, tiered subscriptions, and metered API” is essentially a typical tiered service and metering/billing system. Setting aside the specific brand, this article abstracts it into a general technical problem: how to design a tiered service and billing architecture for LLMs that stays stable and controllable under traffic spikes, cost pressure, and compliance requirements.

    2. Abstracting the Business Model: Three Delivery Channels and Two Billing Models

    2.1 Three Delivery Channels

    • Free basic channel: serves a broad user base, drives acquisition and word-of-mouth, and is characterized by high concurrency, low per-request value, and latency sensitivity.
    • Tiered subscription channel: monthly paid, with different tiers mapping to different concurrency quotas, context length limits, available model scope, and response priority.
    • Pay-as-you-go API channel: for enterprises and developers, metered by token or call count, emphasizing stability, auditability, and SLAs.

    2.2 Technical Implications of the Two Billing Models

    Subscription is “prepaid on the time dimension,” where the core tension is overselling versus experience guarantees; pay-as-you-go is “postpaid on the resource dimension,” where the core tension is metering accuracy and bill explainability. When both coexist, you must implement unified identity, unified quota, and unified metering on the same gateway; otherwise an architectural flaw emerges in which “subscription users and API users compete for the same resources.”

    3. Overall Architecture: Unified Access Layer + Model Routing + Quota and Metering Plane

    A five-layer structure is recommended:

    1. Access layer: authentication, rate limiting, WAF, TLS termination, distinguishing three identity types—web, mobile, and API key.
    2. Routing layer: request distribution by tenant tier, model tag, and scenario tag, with canary release and fallback support.
    3. Inference layer: pooled model instances deployed in tiers by GPU memory and throughput, with batching and KV cache reuse.
    4. Governance plane: quota center, metering center, billing center, and risk control center.
    5. Observability plane: metrics, logs, tracing, and alerting.

    Illustrative gateway configuration (pseudocode, expressing only the idea of tiered rate limiting):

    1. tenant_tiers:
    2. free: { rpm: 60, concurrency: 2, context_max: 8k, priority: low }
    3. basic: { rpm: 600, concurrency: 8, context_max: 32k, priority: mid }
    4. pro: { rpm: 3000, concurrency: 32, context_max: 128k, priority: high }
    5. api_key: { quota: "postpaid", meter: ["prompt_tokens","completion_tokens"] }
    6. routing:
    7. - match: tier == "free"
    8. fallback_model: "small"
    9. - match: tier in ["basic","pro"]
    10. fallback_model: "large"

    4. Multi-Tenancy and Quota Governance: Turning “Tiers” into Enforceable Policies

    Tiers are not just UI differences; they are differences in resources and policies. Four things need to be implemented:

    • Identity and key system: user mode uses session tokens, enterprise mode uses API keys, and keys support rotation, scopes, and IP allowlists.
    • Quota model: maintain both “rate quotas (RPM/TPM)” and “period quotas (daily/monthly token caps)” to prevent abuse on a single dimension.
    • Priority and queuing: high-priority requests enter a short queue, while low-priority requests are downgraded to a smaller model or queued during peak times to protect the paid experience.
    • Fair scheduling: use weighted fair queues per tenant to prevent a single large customer’s long-context requests from dragging down overall throughput.

    In engineering practice, move quota checks forward to the access layer, using local cache plus a centralized token bucket for “approximate accuracy,” and place strong-consistency checks in the metering and billing stages in exchange for throughput.

    5. Metering and Billing Consistency: Explainable Bills Are the Lifeline

    The hardest problem in pay-as-you-go billing is not price but “the numbers don’t add up.” Follow three principles:

    1. Single source of truth: use the actual token consumption and call status from the inference layer as the only metering source; the gateway only passes through and does not re-estimate.
    2. Idempotency and deduplication: each request carries a request ID, metering events are written to a message queue, and the consumer writes to the database idempotently by ID to avoid duplicate billing caused by retries.
    3. Event traceability: retain request-level details (time, tenant, model, input/output tokens, status code, failure reason) to support user self-service reconciliation.

    Simplified event structure example:

    1. {
    2. "request_id": "req-9f2c",
    3. "tenant_id": "t-1024",
    4. "tier": "pro",
    5. "model_tag": "large",
    6. "prompt_tokens": 1820,
    7. "completion_tokens": 460,
    8. "status": "success",
    9. "latency_ms": 2380
    10. }

    Whether failed requests are billed must be clarified at the product and contract level; technically, use the status field to drive differentiated settlement rules and avoid disputes.

    6. Cost Control: Inference Is the Main Cost Center

    The cost structure of LLM services differs significantly from traditional web services, with inference compute dominating. Actionable measures include:

    • Tiered model routing: simple tasks go to small models and complex tasks go to large models, which in practice can reduce unit cost without significantly hurting experience.
    • Batching and caching: reuse KV cache for high-frequency repeated prefixes; apply dynamic batching for offline tasks to improve GPU utilization.
    • Context compression: retrieve and summarize long documents before feeding them into the model to reduce wasted tokens.
    • Elastic scaling: scale out by queue length and GPU utilization, with a scale-in cooldown window to avoid flapping.
    • Storage tiering: sink logs and detail data to object storage on a schedule, keeping hot data in the query engine.

    It must be emphasized that no cost-reduction measure may sacrifice metering accuracy; the metering pipeline must be decoupled from the business pipeline.

    7. Availability and Degradation: The Bottom Line for Paid Experience

    • Multi-level degradation: when the large model is unavailable, fall back to a small model; when the small model is unavailable, return templated results or a queuing notice.
    • Circuit breaking and isolation: use bulkhead isolation by tenant and model tag to prevent a single point of failure from spreading.
    • Canary release: open new models to internal tenants first, then ramp up by tier, with metrics dashboards and automatic rollback.
    • Capacity planning: for subscription actions like “pausing new user subscriptions,” this should be implemented as a configurable admission switch rather than hard-coded logic.

    8. Security and Compliance: Data Boundaries Must Not Be Blurred

    • Data isolation: tenant-level encryption keys or logical isolation, with logs masked before entering the data warehouse.
    • Content safety: bidirectional review of inputs and outputs, retaining audit samples with a defined retention period.
    • Key governance: least privilege for API keys, revocable and auditable, with automatic alerts on anomalous calls.
    • Compliance evolution: if a company considers capital-market actions (such as a listing evaluation), this usually means stricter internal controls, auditing, and data governance requirements, so the architecture should reserve audit interfaces and data retention policies in advance.

    9. Observability and SLO Design

    Define four SLOs: availability, time to first token, overall latency, and metering accuracy. Monitoring metrics should cover at least QPS, concurrency, queue length, GPU utilization, token throughput, failure rate, and billing deviation rate. Alerts should distinguish “experience” from “accounting”; accounting alerts should go directly to on-call and finance, because billing errors are highly sensitive incidents.

    10. Rollout Roadmap

    1. Weeks 1–2: unified identity and gateway, connecting quota for both free and subscription channels.
    2. Weeks 3–4: integrate the metering event bus, completing idempotency and reconciliation reports.
    3. Weeks 5–6: tiered model routing and caching, building a cost dashboard.
    4. Weeks 7–8: degradation plans, canary system, and closed-loop SLO alerting.
    5. Ongoing: compliance audit interfaces, key governance, and capacity plan drills.

    11. Conclusion

    Competition in LLM services is about model capability on the surface, but about delivery and governance underneath. Unifying free, subscription, and pay-as-you-go into one measurable, degradable, and auditable architecture is how you build a truly sustainable technical moat beyond funding, release, and compliance cycles. If an organization wants to implement these capabilities on Baidu AI Cloud, it can first reuse general building blocks such as its container platform, message queue, object storage, logging service, and monitoring/alerting, then complete the upper-layer design following the tiering and metering principles in this article.