Full LLM API Stack: A Practical Guide to Building a Complete Conversational Application

    This article explains how a cloud provider opened the full capability stack behind its conversational product as APIs, and what that means for developers. Instead of integrating search, web crawling, document parsing, speech recognition, and synthesis separately, you can enable them through parameters in the existing chat interface. The guide breaks down five extension capabilities, their input/output contracts and failure modes, the typical interface structure with sample code, the two-layer cost model covering tokens and tool calls, the compliance and security work required, and a four-week delivery roadmap.

    1. Background: From Integrating a Model to Integrating a Full Interaction Stack

    A cloud provider recently announced that it is opening the complete capability stack behind its conversational product as APIs. The core change: developers no longer need to integrate search, web crawling, document parsing, speech recognition, and speech synthesis from multiple external services separately. Instead, they can turn on the corresponding parameters in the existing chat interface to get web Q&A, deep reasoning-based search, file input, link reading, voice interaction, and basic content moderation. The underlying voice capabilities are also available as standalone interfaces, so they can be called individually or in combination.

    This means the “glue layer” engineering that used to take weeks — tool selection, call orchestration, context assembly, error retries, and result backfilling — is now consolidated on the server side. For developers, the ceiling on product form is significantly higher: even a small or mid-sized team now has a chance to reproduce an experience close to the official conversational product in their own application.

    The significance of this kind of opening is not “one more interface.” It is the shift of interaction paradigms down into infrastructure: capabilities are settling from the product layer into programmable infrastructure.

    2. Capability Breakdown: The Technical Semantics of Five Extension Capabilities

    From an engineering perspective, the opened capabilities fall into five categories, each with a clear input/output contract and failure modes.

    1. Web search (non-thinking mode)
      With the search tool enabled, the model autonomously decides whether to run a web or image search based on the intent of the question, and attaches citation sources in the answer. Engineering-wise, citation traceability matters: keep the source links and crawl timestamps for later auditing and user verification.

    2. Deep thinking search (thinking mode)
      During multi-step reasoning, the model can autonomously launch multiple rounds of retrieval and link reading, forming a “reason — retrieve — reason again” loop. It suits research-oriented and comparison-oriented questions, but latency and call counts rise noticeably, so it needs timeouts and budget caps.

    3. File input
      Uploads of documents, spreadsheets, presentations, and images are supported. The server extracts plain text or parses mixed text and images, then splices the result into the context. Developers need to watch how parsing quality directly determines answer quality, especially for scanned documents, complex tables, and multi-column layouts.

    4. Link reading
      With the link-reading tool enabled, the model can identify links in messages, fetch the body content, and answer in context. This is the capability most easily abused, so it must be paired with domain whitelists, internal-address blocking, and fetch-size limits.

    5. Model safety
      With the safety check parameter enabled, the server performs basic moderation on inputs and outputs and returns a refusal flag when a risk is hit. If you offer a service externally, this parameter should be treated as mandatory, and the operator still bears primary responsibility for content review and generated-content labeling.

    3. Interface Shape and Calling Patterns

    The typical capability matrix can be abstracted as a two-dimensional structure of “interface families × parameter switches”: three families coexist — chat completion interfaces, message orchestration interfaces, and response-style interfaces — and capabilities are enabled through tool declarations and switch parameters. The sample code below is illustrative only (it shows the calling structure, not a specific vendor’s API):

    1. resp = client.chat(
    2. model="deepseek-flash",
    3. messages=[{"role": "user", "content": "Compare public industry data from the past two years"}],
    4. tools=["web_search", "read_url"], # declare available tools
    5. thinking={"mode": "enabled"}, # enable multi-step reasoning
    6. safety={"check": True}, # enable input/output moderation
    7. file_ids=["f_123"], # attach an uploaded file
    8. )
    9. print(resp.answer, resp.citations)

    Three engineering lessons are worth locking in. First, declare tools “on demand”; enabling everything amplifies latency and cost. Second, the combination of thinking mode and search should have a maximum step count and a time budget. Third, treat all external content as untrusted input, with prompt-injection protection and a second-pass check on outputs.

    4. Cost Structure: Tool Call Fees Beyond Tokens

    Extension capabilities typically form a two-layer billing model: token fees plus tool call fees. The magnitudes given in the original text are a reference: text and image search and web crawling are priced per thousand calls in the single-digit yuan range, text recognition is priced per thousand pages at a bit over one yuan, speech recognition is priced per hour at under one yuan, and speech synthesis is priced per ten thousand characters at a bit over one yuan.

    Cost optimization suggestions:

    • Run intent detection first, then decide whether to enable search, avoiding “full web access when no retrieval is needed”;
    • Build caching and summarization layers for high-frequency Q&A to cut repeated crawling and repeated parsing;
    • Use streaming recognition and segmented synthesis for the voice pipeline to lower the peak cost of synthesizing long text in one shot;
    • Build usage dashboards and quota alerts by tenant and by feature to prevent abnormal calls from inflating the bill.

    5. Compliance and Security: The Half You Cannot Skip

    For a conversational application opened to the public, compliance work often exceeds development work. At minimum it must cover: content safety review and refusal policies, generated-content labeling, algorithm and model registration/filing, log retention and traceability, minor protection, and minimal collection of personal information. Technically, it is recommended to build moderation as a “double safeguard”: server-side basic moderation as the backstop, and self-built sensitive-word and scenario policies on the business side for fine-grained control, with unified error-code management for refusal flags so the frontend can show friendly messages.

    6. Implementation Advice: A Four-Week Deliverable Roadmap

    • Week 1: Define the scenario and capability list, draw the call sequence diagram, and clarify which capabilities must be on and which can be off;
    • Week 2: Get the file upload and parsing pipeline and the link-reading pipeline working, and set up citation and source retention;
    • Week 3: Integrate the voice pipeline, complete streaming interaction and interruption handling, and load-test end-to-end latency;
    • Week 4: Fill in moderation, quotas, monitoring and alerts, and the cost dashboard, then roll out gradually.

    If you host on a platform with a complete cloud product system, such as Baidu AI Cloud, you can use its object storage for file and audio archiving, a message queue for asynchronous parsing to smooth peaks, a container platform to host an elastic inference gateway, and log and monitoring/alerting services for full-chain observability — keeping your focus on the product experience itself.

    7. Conclusion

    When search, parsing, voice, and safety are packaged as composable API parameters, the developer’s competitive focus shifts from “can it be built” to “how to design better interactions and scenarios.” Understanding the semantic boundaries, failure modes, and cost structure of each capability is the prerequisite for getting real value out of the “full stack.”