LLM Application Capabilities as APIs: A Technical Guide to Replicating a Full Conversational Product

    This article examines the shift from model APIs to application-capability APIs, where a cloud provider exposes the full capability stack behind its conversational product. It breaks the stack into four layers—inference core, tool augmentation, input modalities, and safety—explains how parameters enable web search, deep-thinking search, URL reading, file input, voice, and content moderation, and provides sample orchestration code. It also covers engineering best practices, the additional tool-call cost structure beyond token fees, security and compliance obligations, and a reference architecture for building a 1:1 conversational application.

    1. Background: From “Model APIs” to “Application-Capability APIs”

    A cloud provider recently announced that it is opening up the full capability matrix behind its conversational product as APIs. Developers can enable capabilities such as web search, deep-thinking search, file input, URL reading, voice interaction, and content safety simply by turning on the corresponding parameters in the existing interface. The underlying voice capabilities—optical character recognition (OCR), automatic speech recognition (ASR), and text-to-speech (TTS)—are also available as standalone endpoints that can be called individually or in combination.

    The core of this change is not “a few more endpoints.” It is a shift in the granularity of capability delivery: what used to be delivered was “model inference”; what is now delivered is a “complete conversational interaction loop.”

    In the official product’s chat service, web retrieval, file input, URL reading, voice interaction, and safety controls work together with model inference to deliver the experience users are familiar with. But to replicate a similar experience in their own applications, developers previously had to: integrate a base inference endpoint + build their own search integration + implement their own document-parsing pipeline + handle multi-turn context assembly themselves + stand up their own risk controls. The engineering chain was long, failure points were numerous, and debugging costs were high.

    With these capabilities opened up, tool invocation and context assembly are handled automatically on the server side, and developers return from being “integrators” to being “product designers.”

    2. Capability Layers: Breaking the “Full Suite” into Composable Atomic Capabilities

    The best way to understand this capability set is through four layers: “inference core—tool augmentation—input modalities—safety foundation.”

    2.1 Inference Core Layer

    A general-purpose large model (such as a lightweight flash-class model) serves as the base, typically offering multiple interface styles (message-based, response-based, and chat-completion-based) to stay compatible with different existing codebases. Engineering recommendation: for new projects, prioritize the interface style that best fits your existing middleware, and avoid large-scale rewrites just for the sake of “unification.”

    2.2 Tool Augmentation Layer

    • Web search: With the search tool enabled in non-thinking mode, the model can automatically initiate web or image retrieval based on the question and include citation sources in the answer.
    • Deep-thinking search: With the same search tool enabled in thinking mode, the model can autonomously initiate retrieval and read links during multi-step reasoning, forming a “think-and-search” loop.
    • URL reading: With the URL-reading tool enabled, the model can automatically detect URLs in the user’s message, fetch the page content, and answer in context.

    The essential difference among the three is a trade-off between autonomy and latency: regular search is a single-step tool call with low latency; deep-thinking search is a multi-step agent loop with significantly higher latency and token consumption.

    2.3 Input Modality Layer

    Supports uploading documents and images (such as PDF, office documents, and image formats), performing plain-text extraction or mixed text-and-image parsing, and then assembling the result into the context. On the voice side, recognition and synthesis capabilities are provided through standalone endpoints that can be freely combined with the text pipeline.

    2.4 Safety Foundation Layer

    With the safety-check parameter enabled, the server performs basic risk control on both model inputs and outputs, returning a refusal flag when a risk is detected.

    3. Engineering Implementation: Parameterized Orchestration and Sample Code

    The post-opening invocation pattern can be summarized as “one main call plus several switches.” A sketch is shown below (pseudocode, expressing orchestration logic only):

    1. resp = client.chat.completions.create(
    2. model="deepseek-flash",
    3. messages=[{"role": "user", "content": "Help me summarize the core risks in this annual report"}],
    4. tools=["deepseek_web_search"], # Enable web search
    5. # tools=["deepseek_read_url"], # Enable URL reading
    6. file_ids=["file_xxx"], # File input
    7. thinking={"type": "enabled"}, # Thinking mode; combined with search this becomes deep-thinking search
    8. safety={"enabled": True}, # Safety check
    9. )

    Engineering key points:

    1. Minimize switches: Enable only the tools required for the current scenario to avoid unnecessary retrieval and token overhead.
    2. Mode-tool coupling: Deep-thinking search requires both “thinking mode + search tool” at the same time; missing either one degrades it to ordinary Q&A.
    3. Prefer either files or links: Stuffing a large file and multiple links into the same turn can easily overflow the context and dilute attention.
    4. Fallback path: When search times out or fetching fails, fall back to “model-only answer + clearly informing the user that information is missing,” rather than returning an error directly to the user.

    4. Cost Structure: Tool-Call Fees Beyond Token Costs

    Extended capabilities are typically billed separately in addition to token fees, commonly metered per call, per page, per hour, or per character. The magnitudes given in the original text can serve as a reference: text/image search and web page fetching are both 5 RMB per thousand calls, text recognition is 1.5 RMB per thousand pages, speech recognition is 0.39 RMB per hour, and speech synthesis is 1.5 RMB per ten thousand characters.

    Cost optimization recommendations:

    • Cache first: Build a retrieval-result cache for high-frequency identical questions; a cache hit skips the tool call.
    • Tiered routing: Route simple questions through non-thinking mode, and escalate only complex questions to deep-thinking search.
    • Batch and preprocess: For document tasks, parse and store offline first, then retrieve only fragments online, reducing repeated recognition charges.
    • Observability: Establish monitoring and alerts for tool-call volume, failure rate, and per-session cost to avoid runaway bills.

    5. Security and Compliance: Enabling Risk Control Is Only the Starting Point

    It must be emphasized: enabling the safety-check parameter is only basic risk control and does not mean compliance obligations are fulfilled. If you provide an application service to the public, developers still bear obligations such as content safety review, large-model-related registration, and AI-generated content labeling.

    Implementation checklist:

    1. Input side: intercept sensitive terms and unauthorized intents; output side: present refusal flags in a user-friendly way.
    2. Record-keeping: retain necessary invocation and review logs for traceability.
    3. Labeling: apply explicit or implicit labels to AI-generated content.
    4. Fallback: establish human review and appeal channels.

    6. A Reference Architecture for a Replicable “Complete Conversational Product”

    To replicate a complete conversational application 1:1, you can refer to the following layering:

    • Access layer: authentication, rate limiting, quotas, auditing.
    • Orchestration layer: intent recognition → tool selection (search/URL reading/file) → mode decision (whether to think).
    • Capability layer: model inference + retrieval + document parsing + voice + risk control, all hosted by the server.
    • Data layer: conversation history, file object storage, retrieval cache.
    • Operations layer: logging service, monitoring and alerting, cost accounting.

    Combined with general cloud product categories (object storage, message queues, container platforms, logging services, monitoring and alerting), you can build an elastic, scalable production system without building your own search and parsing pipelines.

    7. Conclusion

    The real significance of capability API-ization lies in turning “repetitive foundational work” into platform capabilities, allowing developers to focus on interaction design and scenario innovation. For developers, the pragmatic path is: first get the loop working with the minimal set of switches, then gradually introduce deep-thinking search and voice multimodality, and finally use caching, tiered routing, and observability to keep both cost and stability under control.