Web Search Billing for LLM APIs Shifts from Per-Call Fees to Token-Based Pricing

    A large model provider has folded web search and page fetching triggered during model calls into regular token billing, dropping per-call fees for those actions. The per-call rule lasted only 18 days. This article compares the two billing models, explains why per-call pricing was hard to predict and manage, and offers practical ways for developers to monitor and control the token cost of web-enabled requests.

    Background: A Billing Rule That Lasted 18 Days

    Recently, a large model provider changed the billing policy for its API. Server-side web search and page fetching that the model triggers automatically during a call are no longer billed per call. Instead, they are included in regular token billing. Developers using web tools now only need to track the token usage of each request, without paying separately for each background search.

    The per-call billing rule had a very short life. When the provider released a new model version, it also opened Search and Fetch interfaces built on its proprietary search engine. These were priced at 5 RMB per 1,000 successful requests. Developers received a transition period of about two weeks, during which server-side tool calls in mainstream AI coding tools and command-line agents were not charged. The rule went from launch to cancellation in 18 days.

    The change applies only to searches and fetches triggered automatically during model calls. Standalone Search and Fetch APIs keep their original per-call pricing. This distinction matters. The provider did not stop charging for search itself. What it removed was the separate charge for implicitly triggered browsing, and the cost of that browsing now sits inside token billing.

    Two Billing Models Compared

    2.1 Per-call billing: visible behavior, unpredictable cost

    Per-call billing treats each server-side search and each page fetch as a separate billable unit. Its strength is that charges map directly to resource consumption, so pricing is transparent. Its inherent weakness is that the number of triggers is unpredictable.

    In a model call with web access, one user request may trigger zero, one, or several rounds of searching and fetching:

    • The model may first run a search to gather candidate results.
    • It may then fetch the body text of multiple result pages, one by one.
    • If the information is still insufficient, it may run a second or third search round to fill the gaps.

    A single ordinary request can therefore produce 5, 10, or more search and fetch actions behind the scenes. Developers cannot know the exact call count when they send the request, so the cost curve is highly variable. For enterprises that need to allocate costs precisely to business lines or end customers, this unpredictability makes financial accounting and budget management considerably harder.

    2.2 Token billing: reducing complexity to one dimension

    Under unified token billing, the cost of web access converts into tokens. Search results and fetched page text are placed into the model’s context, which shows up as additional input tokens. Cost accounting then reduces to a single formula:

    1. Cost per request ≈ input tokens × input price + output tokens × output price

    The core idea is that context length carries the cost of external information. The approach is internally consistent. Search and fetch operations (index queries, page downloads, content cleaning) run outside model inference, but their output enters the model through tokens. Billing by tokens converts external tool consumption into model inference consumption, using one unified measurement basis.

    Why Providers Reversed Per-Call Billing So Quickly

    The 18-day lifespan suggests that per-call billing ran into several problems in practice.

    First, developer experience suffered. In high-frequency web scenarios such as AI coding assistants and command-line agents, every tool call generates a separate line item on the bill. Developers see fragmented billing details and feel they are being charged repeatedly. Even when each charge is small, the psychological barrier remains.

    Second, unpredictable budgets discouraged adoption. Web search helps model answers stay current and accurate. If each use carries an uncertain extra fee, developers may leave web access off by default. That weakens the model’s capabilities and works against the provider’s goal of promoting web access.

    Third, billing and reconciliation were costly. Per-call billing requires the server to count each search and fetch precisely, define success (including whether failed requests are billed), and handle reconciliation and disputes. These tasks add real operational overhead for the provider. Folding them into token billing greatly simplifies the metering pipeline.

    Fourth, competitive pressure. The large model API market is highly competitive. Simpler billing and lower entry barriers are common ways to win developers. Folding web costs into tokens effectively lowers the price barrier to using web features.

    Impact on Developers and Recommendations

    4.1 Quantifying the change in cost structure

    Removing per-call fees moves the cost of web-enabled calls into input tokens. A typical web-enabled Q&A request has roughly this token breakdown:

    1. Input tokens = system prompt + user question + search result summaries + fetched page text (after truncation)
    2. Output tokens = model-generated answer

    Fetched page text is often the largest share of token consumption. An untruncated web page can add thousands or even tens of thousands of tokens. Although there is no per-call fee, the token cost of a web-enabled request can be significantly higher than that of a plain text request, so developers should set up monitoring for it.

    4.2 Engineering recommendations

    1. Set token budget baselines by scenario. Split traffic into plain text requests and web-enabled requests. Track P50 and P95 token usage for each to set cost baselines and spot abnormal changes.

    2. Control the size of injected context. Where configuration is available, limit the number of search results returned, and truncate or summarize fetched page text. This keeps low-value content from crowding the context window and raising costs.

    3. Add a business switch for web access. Not every request needs web access. At the application layer, classify intent first. Knowledge-based and time-sensitive questions go through the web path. Requests that do not depend on external information, such as code generation or text rewriting, go straight to plain model calls.

    4. Monitor usage and set alerts. Use general-purpose logging and monitoring services to aggregate token usage by day or hour, and set threshold alerts. This guards against runaway costs caused by unusual traffic or code defects. Enterprise users can send model call logs to a log service and use object storage for long-term archiving, which supports cost traceback analysis.

    5. Choose the right interface type. Standalone Search and Fetch APIs remain billed per call. They suit scenarios that need fine control over search results and their own processing of retrieval output, such as a self-built RAG pipeline. The model’s built-in web tools suit out-of-the-box conversational scenarios. The two billing models differ, so choose based on architecture needs rather than mixing them arbitr