Modular AI Application Capabilities: Three Bills to Pay After Assembling the Pieces
AI capabilities are increasingly being unbundled into independently billable components—search, web scraping, document parsing, and more—priced per call, per page, or per character. This article explains what modularization actually sells, why building an AI product has become cheap while operating one has become expensive, and breaks down the three bills every team must pay: backend engineering, compliance, and cost. Includes a practical checklist and a sample orchestration skeleton.
A complete AI application is being broken down into parts you can order individually. As one cloud vendor puts it in its official documentation, developers can now replicate a full official application experience almost one-to-one inside their own apps. The accompanying price list breaks capabilities down to a granular level: search is billed per thousand calls, web scraping per thousand calls, document parsing per thousand pages. Spread across a single page of a document, the cost is nearly negligible.
Many people read announcements like this as “another category of capability just got cheaper.” That reading isn’t wrong, but it misses the more important point: what is actually being sold is not a stronger model, but the decoupling of “a usable AI product” into a set of atomic capabilities that can be billed, scaled, and replaced independently. This makes “building the product” cheaper while making “operating the product well” more expensive. The real dividing line is not whether you can call an API—it’s who ultimately pays the three bills of backend engineering, compliance, and cost.
I. What Modularization Actually Sells
Abstracting this kind of capability catalog yields roughly four layers:
- Inference layer: general-purpose chat, long-context understanding, structured output, function calling.
- Retrieval layer: web search, result ranking, summary extraction.
- Acquisition and parsing layer: web scraping, content extraction, document parsing and OCR, audio/video transcription.
- Data processing layer: text embedding, reranking, content safety moderation.
The key change is that these four layers used to be bundled inside a closed product—you could only take it or leave it as a whole. Now each layer has its own metering unit (calls, pages, characters, duration) and its own failure semantics. The engineering implication: system complexity migrates from “calling a black box” to “orchestrating multiple heterogeneous services.”
II. Why “Building It” Got Cheaper
First, the cost of trial and error drops. Validating an idea no longer requires building your own crawling cluster, training or fine-tuning models, or maintaining a parsing pipeline. An interactive prototype can go live in days.
Second, capabilities are replaceable. Retrieval providers, parsing engines, and inference backends can all be swapped through an adapter layer, avoiding lock-in to a single implementation.
Third, marginal costs are predictable. Usage-based billing lets you estimate unit economics before writing the first line of code, rather than discovering negative gross margins after launch.
But what got cheaper is “zero to one.” The journey from “one to one hundred” requires paying the following three bills.
III. The First Bill: Backend Engineering
Modularization turns synchronous calls into distributed orchestration, bringing with it every problem distributed systems have.
- Idempotency and retries. Scraping and parsing naturally time out. Assign an idempotency key to every external call, persist results before responding, and prevent duplicate billing from repeated user clicks.
- Asynchronous tasking. Document parsing and transcription are long-running tasks; use a message queue plus worker nodes, with the frontend polling or subscribing with a task ID.
- Layered caching. Cache results for high-frequency, low-timeliness queries; cache parsing results by content hash so cache hits are free.
- Rate limiting and quotas. Set concurrency and rate caps per tenant so a single caller cannot drag down the whole system.
- Observability. Logging plus monitoring and alerting should cover not just error rates, but also the number and latency distribution of external calls per unit request.
- Degradation routing. Switch to a backup search provider when the primary is unavailable; fall back to plain-text extraction when parsing fails. Availability comes first.
An illustrative orchestration skeleton (pseudocode, structure only):
def handle(request, ctx):key = hash(request.query + request.doc_id)if cached := cache.get(key):return cachedif not budget.allow(ctx.tenant, request.estimate_cost()):return degrade(request) # Budget guard, before any external calltask = queue.submit(parse_doc, request.doc_id, idem_key=key)doc = task.result(timeout=30) or fallback_extract(request.doc_id)hits = search(request.query, top_k=8, idem_key=key)ctx.audit.log(tenant=ctx.tenant, calls=2, pages=doc.pages)answer = llm.chat(context=doc.text + hits, schema=Answer)cache.set(key, answer, ttl=600)return answer
IV. The Second Bill: Compliance
Capabilities can be purchased piecemeal; responsibility cannot. Once data leaves your boundary, the compliance obligation remains yours.
- Data classification and minimization. Detect and mask sensitive fields before upload, and only transmit what is necessary for the task.
- Retention and deletion policies. Clarify the log retention period of external services, and set lifecycle rules on your own object storage to automatically purge data when it expires.
- Authorization boundaries. Web scraping must respect site terms and robots protocols, control request frequency, avoid explicitly prohibited paths, and never bypass access controls.
- Content safety and traceability. Route generated content through a moderation pipeline, and retain audit records of inputs and outputs to support after-the-fact tracing.
- User notice and consent. When personal information is processed, explain the purpose and scope of processing to users.
- Supply chain compliance. Prepare replaceable implementations for every external dependency to avoid business continuity risks from single points of dependency.
V. The Third Bill: Cost
The biggest trap of usage-based billing is that cost decouples nonlinearly from business volume.
- Build a unit economics model: external calls per active user per day × unit price = cost per user, then compare against average revenue per user.
- Metering before spending. If a request’s estimated cost exceeds budget, return a degraded result instead of spending first and erroring later.
- Structural optimization. Trim ineffective context (retrieve from long documents before feeding them to the model), batch and merge requests, and reuse parsing results.
- Tiered service. Free users run on a small model with aggressive caching; paying users get the full pipeline.
- Attribute costs to tenants. Tag every external call with tenant and business-line labels so you can locate the source of losses.
VI. A Launch Checklist
- Do all external calls have idempotency keys and timeout limits?
- Are there budget guards and degradation paths?
- Is there a per-tenant cost attribution dashboard with alerting?
- Are data classification, masking, retention, and deletion fully closed-loop?
- Do scraping and parsing have authorization and frequency controls?
- Does every external dependency have a replaceable adapter layer?
Conclusion: Modularization turns “can we build it?” into an engineering problem, and “can we keep it running?” into an operations problem. Knowing how to call APIs is just the entry ticket. What ultimately decides success is whether the backend can handle the complexity of distributed orchestration, whether compliance can cover the entire data-egress chain, and whether costs can be precisely measured and constrained. On platforms such as Baidu AI Cloud, these capabilities are typically offered under general categories such as object storage, message queues, container platforms, logging services, and monitoring and alerting, which developers can assemble themselves into AI applications that are controllable, auditable, and accountable.
