Large Model Server-Side Retrieval Billing Shifts to Token-Based Metering

    This article explains how a cloud provider's large model platform is moving from per-request pricing to token-based metering for server-side search and web crawling. It covers which invocation paths trigger server-side retrieval, why the billing model is changing, how the cost formula shifts, and practical steps for controlling token usage, caching, observability, and architecture during migration.

    1. What Is Changing: From Per-Request to Token-Based Billing

    A cloud provider’s large model platform has updated its API billing model. Starting at 12:00 Beijing time on November 18, 2026, search and web crawling actions triggered by the server during model calls will no longer be billed separately. Charges will depend only on the model’s token usage.

    It is important to clarify that “no longer billed separately” does not mean retrieval no longer happens. Instead, the cost that was previously priced as a standalone item is now folded into the model call itself. The platform previously offered separate retrieval and crawling APIs, priced per 1,000 successful requests at 5 CNY. The retrieval API accepted a query and returned structured results, while the crawling API targeted a single URL and returned a title and body organized in Markdown.

    2. Which Invocation Paths Trigger Server-Side Retrieval

    There are three typical scenarios that trigger server-side retrieval: the model’s built-in web tool, the web_search tool exposed through an Anthropic-style interface, and the web_search tool exposed through a Responses-style interface.

    What they share is that retrieval is performed internally by the server. The caller only declares that web access is allowed or that a search is needed, without implementing its own crawler, parser, or cleaning pipeline. The differences lie in where the tool is declared and in the returned structure. In engineering terms, they should be abstracted into the same capability switch so that business code is not tightly coupled to one interface form.

    3. Why the Billing Model Is Changing

    First, metering returns to the value itself. Per-request billing is insensitive to how much content a single request returns, which can encourage low-cost, high-frequency crawling. Token-based billing correlates with actual compute consumption and context length.

    Second, the chain becomes shorter and the bill becomes simpler. Retrieval, crawling, and feeding content to the model form one continuous action. Splitting them into two billing items complicates cost accounting and quota management.

    Third, it encourages more reasonable usage. Token metering naturally discourages the crude approach of “crawl a large batch first and pick later,” pushing developers to control retrieval quality.

    4. How the Cost Model Changes

    Let the original cost per retrieval or crawl be p, and assume one model call triggers k retrievals on average. The added cost is k × p. Under token-based billing, the incremental cost is roughly the number of retrieved-content tokens injected into the context multiplied by the input price, and output tokens may also rise because the context becomes longer.

    Illustrative calculation (demonstrates the algorithm only; actual figures depend on real pricing):

    1. def compare_cost(input_tokens, output_tokens, k, p,
    2. in_price, out_price, retrieved_tokens):
    3. old = input_tokens * in_price + output_tokens * out_price + k * p
    4. new = (input_tokens + retrieved_tokens) * in_price + output_tokens * out_price
    5. return old, new

    The conclusion is straightforward: the “heavier” the retrieval results, the more sensitive the token bill becomes. Many retrievals with concise results each time can actually be more cost-effective.

    5. Practical Recommendations

    1. Control the injection volume. Truncate, denoise, and extract key passages from crawled content, and place only the necessary fragments into the context.
    2. Improve cache reuse. Build result caches for hot queries and high-frequency URLs, and use content fingerprints to decide whether a refresh is needed.
    3. Retrieve first, then decide. Use lightweight rules or a small model to judge whether web access is truly needed, reducing unnecessary triggers.
    4. Manage timeouts and retries. Set an independent timeout and backoff retry for retrieval so that failed requests do not amplify into multiple model calls.
    5. Improve observability. Track input and output tokens, cache hit rate, and retrieval trigger rate separately, and use monitoring alerts and logging services to locate cost anomalies.
    6. Decouple the architecture. Wrap retrieval capability in an internal adapter layer so it is easy to switch between different interface forms and self-built solutions.

    6. Migration Notes

    Account for the bill separately before and after the switch to avoid mistaking a metering difference for business growth. Also review quota and limit policies, because peak consumption patterns change under token metering. If you use Baidu AI Cloud capabilities, you can combine general-purpose products (such as object storage for crawled snapshots, a message queue for peak shaving, and a container platform for hosting parsing services) to build a stable retrieval pipeline.