A hosted LLM API is often the lower-operations choice for experimentation and variable demand. Self-hosting is worth evaluating when sustained use or a specific need for control can justify operating the inference stack; a hybrid setup can divide workloads between the two. The cost decision depends on your actual workload and operating expenses, not a universal token threshold.

Compare the cost of work your team accepts, including retries and operating effort—not just the price of a token.

API, self-hosting, or hybrid?

ApproachWho operates inferenceCost patternMay fit when
Hosted APIThe provider runs inference infrastructure; your team integrates its service.Usage-based charges follow API use.Demand varies, you are experimenting, or you want to avoid operating inference infrastructure.
Self-hosted inferenceYour organization operates at least part of the serving infrastructure, on premises or in cloud infrastructure it manages.Hardware or instance costs and engineering work remain part of the total, including when capacity is idle.You expect sustained use, can keep capacity well utilized, and have the people to run the stack.
HybridYour organization routes different tasks to a provider-run API or self-managed inference.Combines usage charges with any fixed infrastructure and operating costs.Different tasks have different control, capacity or model requirements.

A self-hosted deployment does not have to mean a server room your organization owns. It can run on cloud infrastructure that your team manages, but that does not remove responsibility for serving, monitoring and scaling the models.

Hybrid is another way to match a deployment to a task, not a guaranteed discount. You still need to decide which work goes where and compare the full costs of those routes.

What self-hosting changes

With a hosted API, the provider operates the inference infrastructure. Your team still builds the integration, but it does not have to provision and maintain the model-serving stack. That can make an API a practical starting point when demand is irregular or the workload is still taking shape.

Self-hosting transfers more work to your organization: hardware or cloud capacity, storage and networking, serving software, monitoring, scaling and ongoing maintenance. Some of those costs continue when demand is low. A busy, steady workload can make it easier to use the capacity you pay for, but that alone does not show that self-hosting will cost less once engineering and operations are included.

Self-hosting can give an organization more control over where inference runs. The label by itself does not describe every data flow, such as logs or connections to other services. With an API, check that provider’s terms for data retention, training use, residency and security; with either approach, consider the whole application path.

How cache hits change a Kimi API bill

Kimi lists standard K3.1 Pro rates of $2.00 per million uncached input tokens, $0.20 per million cache-hit input tokens, and $10.00 per million output tokens. Its pricing page says the rates were checked October 24, 2026, and excludes applicable taxes. Kimi treats uncached input, cache hits and cache writes as separate billing categories; cache writes have their own rate. Kimi’s K3.1 Pro pricing page

For 5 million input tokens and 1 million output tokens, using the listed rates:

  • If all input is uncached: (5 × $2.00) + (1 × $10.00) = $20 before applicable taxes.
  • If all input is cache hits, with no cache writes: (5 × $0.20) + (1 × $10.00) = $11 before applicable taxes.

That is a $9 difference, or 45% of the uncached example’s $20 total. The calculation applies to these token amounts and Kimi’s listed rates; it is not a self-hosting break-even estimate. For repeated prompts, count cache writes separately rather than assuming every input token qualifies for the cache-hit rate.

Count the cost of accepted work

KNOW TECH’s documentary examines idle GPU capacity, operating costs, MLOps staffing and observability.

Token price is only part of the bill. A task that needs retries or fallback calls can cost more than its first request suggests, and a response that fails your acceptance criteria has not completed the job. A useful comparison is the total cost of each route divided by the number of tasks that meet the same acceptance criteria.

An API gateway does not, by itself, lower a provider’s token rates. Routing requests to less costly models when appropriate, caching reusable prompts and setting quotas can help manage usage; visibility into spending can also help identify costly workflows. Whether those controls reduce total cost depends on how they affect your actual work.

KNOW TECH’s documentary discusses idle GPU capacity and operating costs, including MLOps staffing and observability. It offers context on the expenses behind inference infrastructure, rather than a reproducible numerical comparison.

Test your workload before committing

A practical pilot compares the options on representative work rather than relying on a general token-volume rule:

  1. Choose tasks your team actually needs and define what counts as an acceptable result, including any required structured output or correct tool call.
  2. Run the same tasks through the routes you are considering. Track accepted results, latency, token use, retries and fallback calls.
  3. Add the costs each route creates: API usage, or infrastructure and engineering costs for self-hosting. Account for idle capacity as well as busy periods.
  4. Divide each route’s total cost by its accepted tasks, then compare the results alongside the operational work each option requires.

One community experiment compared agent harnesses using Qwen3.5-4B Q4_K_M through a single llama-server on a MacBook Pro M5 with 32 GB of memory and a 64K context. It used five basic tasks, each run once. That describes a specific local setup and harness comparison; it does not compare local inference with an API.