Merging Search and Crawling into Token Billing: Simplifying AI Platform Cost Models

    Recently, an AI model service platform adjusted its billing method for internet-connected capabilities by merging server-side search and crawling costs into model Token usage, rather than charging per request. This article explores this shift, analyzing the differences between per-request and per-Token billing semantics. It highlights how embedded tool calls affect overall cost through context inflation and offers engineering practices for developers to transition from a "per-request budget" to a "Token budget" mindset, ensuring predictable and manageable costs for AI applications.

    1. Overview: Not “Free Search”, but Merged Billing Metrics

    Public information indicates that a model service platform adjusted its billing method for internet-connected capabilities: server-side search and web crawling automatically triggered during model calls are no longer billed separately per request. Instead, they are merged into the model Token usage billing. Independent search and web crawling APIs remain unaffected, still billed per successful request. This per-request strategy was canceled after only 18 days of execution, indicating a strong coupling between billing granularity, product form, and developer usage paths.

    A common misconception needs clarification: “only charging by Token” does not mean all search and crawling capabilities are zero-cost. It means server-side tool calls embedded in the model call chain no longer generate independent per-request bills. For developers focused on model generation, the bill simplifies from “Model Token fees + Search/Crawl per-request fees” to just “Model Token fees.” For businesses directly calling independent search/crawl APIs, per-request billing remains in effect.

    Billing Object Before Adjustment After Adjustment Main Impact on Developers
    Server-side search triggered by model calls Billed per successful request Merged into model Token billing Fewer bill items, but context Token inflation needs attention
    Web crawling triggered by model calls Billed per successful request Merged into model Token billing Crawled content length and cleaning strategy directly affect cost
    Independent search API Billed per successful request Unchanged Non-model scenarios still require per-request budgeting
    Independent web crawling API Billed per successful request Unchanged Batch crawling still requires controlling success rate and call volume

    2. Two Billing Semantics: What Per-Request and Per-Token Measure

    Per-request billing measures the frequency of “external resource calls,” suitable for capabilities with clear request boundaries like search, crawling, and parsing. Per-Token billing measures the scale of “model context computation,” suitable for capabilities driven by text length like generation, comprehension, and reasoning. These two are not simple substitutes; they correspond to different cost sources.

    In the model call chain, search and crawl results are typically cleaned, truncated, and deduplicated before being injected into the context for the model to generate an answer. Thus, search and crawling not only incur external request costs but also convert into Token consumption through “content injection.” If billed both per-request and per-Token, developers face two variables: tool call count and context length. This makes billing explanations and budget predictions more complex. Merging embedded tool calls into Token billing reduces billing variables, but the cost hasn’t disappeared—it has shifted to context Tokens.

    From an engineering perspective, the benefit of this adjustment is enhanced explainability of the cost structure: a single request mainly involves input Tokens, tool result injection Tokens, and output Tokens. The risk is that context inflation is hard to notice: if many pages are crawled, the text is long, and cleaning is weak, Token consumption may spike rapidly, while developers might still assume “search is no longer billed separately.”

    3. Trigger Chain and Cost Composition: Where the Money Goes

    A typical internet-connected model call can be abstracted as: user request enters the model -> model decides whether web tools are needed -> server executes search -> crawls candidate web pages -> content cleaning and truncation -> result injection into context -> model generates answer. After the adjustment, the search and crawl requests in the first few steps are no longer billed separately, but “context injection” and “model generation” are still measured by Tokens.

    Therefore, the focus of cost optimization should shift from “reducing search frequency” to “controlling injected Tokens.” Pay attention to the following cost points:

    1. Tool call rounds: Multi-round search injects results multiple times, causing continuous context growth.
    2. Pages crawled per round: More pages mean more cleaning and injected content.
    3. Single page content length: Long pages directly increase Tokens; set maximum character or paragraph limits.
    4. Cleaning and summarization strategy: Remove navigation, ads, and duplicate paragraphs; summarize before injection if necessary.
    5. Caching and deduplication: Cache high-frequency queries and identical pages to reduce redundant crawling and injection.
    6. Output length control: Output Tokens are also billed; set a reasonable maximum output.

    You can use the following pseudo-code to estimate the cost of a single request after the adjustment:

    1. def estimate_cost(prompt_tokens, tool_rounds, pages_per_round,
    2. avg_page_tokens, output_tokens, price_per_token):
    3. retrieved_tokens = tool_rounds * pages_per_round * avg_page_tokens
    4. total_tokens = prompt_tokens + retrieved_tokens + output_tokens
    5. return total_tokens * price_per_token
    6. # Example: Reduce avg_page_tokens through summarization and truncation
    7. cost_before = estimate_cost(800, 3, 3, 1200, 500, 0.000001)
    8. cost_after = estimate_cost(800, 3, 3, 400, 500, 0.000001)
    9. print(cost_before, cost_after)

    The code above is generic business pseudo-code, used to illustrate the impact of “tool rounds × pages × Tokens per page” on total cost, and does not represent any specific API or pricing rule.

    4. Lessons from the 18-Day Window: Billing Items Must Match Usage Paths

    A per-request billing strategy being canceled shortly after implementation usually indicates a misalignment between billing items and developers’ actual usage paths. Embedded tool calls are often part of the model’s automatic decision-making, making it difficult for developers to accurately predict search counts before a call. Conversely, independent search/crawl APIs are explicit calls where per-request billing feels more natural. Separating these two scenarios preserves the rationale of billing independent capabilities by resource usage while reducing bill complexity for model call scenarios.

    For platform designers, this suggests that billing granularity must meet three criteria: predictable, explainable, and gradually rollable. For developers, it warns against assuming “canceled billing items equal zero cost,” and highlights the need to establish Token-centric budgeting, monitoring, and regression testing mechanisms.

    5. Engineering Practice Suggestions: From “Per-Request Budget” to “Token Budget”

    1. Establish a unified Token budget. Set Token budgets and alert thresholds by project, tenant, API, or business line, separately tracking input Tokens, tool result injection Tokens, and output Tokens. Tag internet-connected requests separately to compare bill differences before and after the adjustment.

    2. Limit tool rounds and crawl scale. Set maximum tool call rounds, maximum pages per round, and maximum characters per page. Set early termination conditions for multi-round searches, such as stopping when result confidence is high or content duplication is excessive.

    3. Pre-process content cleaning and summarization. After crawling, remove template content, duplicate paragraphs, and low-quality generated content, then summarize by paragraph before injection. For long documents, use a “summarize first, retrieve snippets later” approach to avoid injecting entire pages.

    4. Cache high-frequency results and pages. Establish short-term caches for identical queries and pages, and record cache hit rates. Caching reduces both external crawling and redundant Token injection.

    5. Distinguish embedded tools from independent APIs. Manage embedded tools in model calls via Token budgets; manage independent search/crawl APIs still via successful request counts, setting quotas and cost centers separately.

    6. Monitor key metrics. Recommended metrics include: average Tokens per request, tool call round distribution, pages crawled per round, injected Tokens per page, cache hit rate, percentage of over-budget requests, and output Token percentage. Use A/B testing to compare the cost and quality impact of different cleaning and truncation strategies.

    1. policy = {
    2. "max_tool_rounds": 3,
    3. "max_pages_per_round": 3,
    4. "max_chars_per_page": 4000,
    5. "summarize_threshold_tokens": 800,
    6. "cache_ttl_seconds": 3600,
    7. "max_output_tokens": 800
    8. }
    9. def handle_query(query, model, retriever, cache):
    10. context = build_prompt(query)
    11. for _ in range(policy["max_tool_rounds"]):
    12. decision = model.decide(context)
    13. if not decision.need_tool:
    14. break
    15. pages = cache.get(decision.query)
    16. if pages is None:
    17. pages = retriever.retrieve(
    18. decision.query,
    19. max_pages=policy["max_pages_per_round"],
    20. max_chars=policy["max_chars_per_page"]
    21. )
    22. cache.set(decision.query, pages, policy["cache_ttl_seconds"])
    23. cleaned = clean_and_summarize(pages, policy["summarize_threshold_tokens"])
    24. context = append_context(context, cleaned)
    25. return model.generate(context, max_output_tokens=policy["max_output_tokens"])

    The above is generic business pseudo-code, focusing on demonstrating the controllable parameters of “rounds, pages, characters, summarization threshold, cache, and output limits,” rather than specific API calls.

    6. Risks and Conclusion

    After the billing metrics are merged, developers gain a simpler bill structure, but not zero-cost internet connectivity. The more context injected, the higher the Token consumption; independent search/crawl APIs remain billed per request, requiring separate budgets for batch tasks. It is recommended to conduct cost regression testing before launch: select a typical query set, compare Token usage, tool rounds, crawled pages, and answer quality before and after the adjustment, and form a reusable budget model. Upgrading from a “search count” mindset to a “context Token” mindset is essential to achieving predictable and governable internet-connected call costs after billing simplification.