"Should we use an API or self-host our inference?" is the first infrastructure decision every LLM product faces, and it is usually argued badly — API advocates quote hardware prices, self-hosting advocates quote token prices, and neither prices the full stack both sides carry. This comparison prices both stacks honestly (including the staffing line), gives you the method to derive your own volume break-even, covers what control actually buys and obligates, and ends with the hybrid routing pattern most real estates land on. No current prices are quoted — structures and methods are what survive contact with quarterly price changes.
Frame the Decision: What Each Path Actually Is
The choice is between buying tokens (provider-operated serving with per-use pricing and provider-managed everything) and operating serving (your models, your capacity, your uptime) — a decision about where the operating burden sits, which every later cost and control difference follows from.
| Dimension | Inference API | Self-hosted serving |
| What you buy | Tokens — output, priced per use | Capacity and the obligation to operate it |
| Who operates | The provider, invisibly | Your platform team, visibly |
| Failure ownership | Provider SLA, your workaround | Your architecture, your uptime |
| Model choice | The provider's catalog | Any open or licensed weights |
| Scale response | Elastic by default | Planned capacity plus overflow design |
Middle options exist — managed dedicated environments, serverless GPU — and this comparison deliberately anchors the two ends the query names. What the framing buys you: every cost line, control argument, and compliance question that follows traces back to where the operating burden sits, so deciding that consciously is the actual work.
The Full Cost Stack on Both Sides

Compare total stacks: the API path's per-token spend and egress against self-hosting's GPU capacity, serving infrastructure, and the MLOps staffing that makes it reliable — at low or volatile volume the API usually wins, and the honest comparison prices operations headcount, not just hardware.
| Cost line | API path | Self-hosted path |
| Usage | Per-token pricing, scaling with volume | Amortized capacity cost, scaling with fleet |
| Infrastructure | Included in token price | GPUs, serving nodes, networking, storage |
| Operations staffing | None for serving | The line every naive comparison omits: engineers to run, monitor, update, and scale serving |
| Reliability engineering | Provider's, within SLA scope | Yours: redundancy, failover, update safety |
| Egress and integration | Egress on responses, integration glue | Internal traffic, same glue |
The staffing line is where most comparisons go dishonest: agency analyses that count GPU prices against token prices conclude APIs are often cheaper for most enterprises — and they are right at low volume precisely because the comparison silently includes operations the API buyer never sees. Academic work on on-premise viability reaches the same structural conclusion from the other direction: self-hosting pays at predictable high utilization, which is a staffing-and-utilization statement, not a hardware one.
The Volume Break-Even: When Self-Hosting Pays
The flip is volume-shaped: academic framing puts on-premise viability at predictable high utilization, and practitioner experience agrees — steady token volume amortizes the self-hosted stack while volatile or low volume keeps per-token pricing cheaper — so derive your own threshold from measured volume against the full stacks.
- Take one month of measured tokens — volume by hour, request profile, output-length distribution. Estimates fail here because they are usually optimistic.
- Price the API path at your negotiated or listed rates for that volume.
- Price the self-hosted stack at the utilization that volume implies: the capacity it needs, plus the staffing line at realistic headcount.
- Find the crossover volume where the lines meet — that is your threshold, and it moves with prices on both sides.
- Re-run when anything material shifts: volume doubling, token prices moving, staffing changing.
The threshold is workload-specific by construction — which is the honest answer to "what volume justifies self-hosting," and why any universal number you encounter deserves suspicion.
What Control Buys — and What It Costs You
Self-hosting buys fine-grained control — latency tuning, version pinning, data governance, and compliance boundaries — at the price of owning reliability, updates, and capacity planning, while APIs trade that control for operational simplicity and provider-borne uptime.
| Control dimension | What self-hosting buys | What it obligates you to own |
| Latency and throughput tuning | Engine choice, batching policy, kernel options, hardware placement | The tuning work and the monitoring to verify it |
| Version governance | Exact model versions, promotion timing, rollback control | Update testing, security patching of the stack |
| Data governance | Prompts and outputs never leave your boundary | The boundary's security and its evidence |
| Compliance posture | Deployment-level control regulators can inspect | The audit trail production those regulators expect |
The trade is real in both directions: platform guidance notes that serverless APIs limit fine-grained performance tuning and cost optimization, and enterprise frameworks count quality governance, versioning, capacity, and disaster recovery among self-hosting's dimensions — every one of which is an obligation as much as a capability. An unstaffed self-hosted stack has control in name only.
The Hybrid Answer Most Estates Land On
No — the pattern most enterprises converge on routes by workload: steady high-volume and compliance-sensitive serving on self-hosted capacity, burst overflow and low-volume experiments on APIs, with a routing layer that expresses the policy and the break-even deciding which workloads migrate over time.
| Workload | Placement | Reasoning |
| Steady high-volume core serving | Self-hosted | Volume past the break-even; control worth owning |
| Regulated or sensitive workflows | Self-hosted (boundary) | Data governance requires the boundary regardless of volume |
| Burst overflow | API | Elasticity without capacity commitment |
| Experiments and low-volume features | API | Below break-even; no operating burden justified |
Two rules keep the hybrid healthy: the routing policy is written and reviewed quarterly against the break-even (drift between paths without decisions is the complexity killer), and no workload migrates without the measured numbers that justify it. When placement points to self-hosted, dedicated environments such as OneSource Cloud's private AI infrastructure are one option for the self-hosted tier under your own boundary.
FAQ
What inference volume justifies self-hosting?
Workload-specific, but derivable: take one month of measured tokens, price the API path at your rates, price the self-hosted stack at the utilization that volume implies — including staffing — and the crossover where the lines meet is your threshold. Re-run it when prices or volume shift materially.
Can we get API-grade latency from self-hosted serving?
Yes with engineering: tuned serving stacks on dedicated capacity routinely meet or beat API latency for their model class — the cost is the tuning, monitoring, and capacity discipline the API bundled invisibly, which is exactly the trade this comparison prices.
How do we run both without doubling complexity?
One routing layer with a written placement policy: each workload pinned to a path by volume and data class, the policy reviewed quarterly against the break-even, and no workload allowed to drift between paths without a decision — the complexity killer is drift, not duality.