Self-Hosting Open-Weight LLMs vs API Pricing: The 2026 Break-Even
Part of the toksum.dev Guides · verified against official provider pricing pages
Two cost shapes, not two prices
The mistake almost every self-hosting analysis makes is comparing a GPU rental rate against an API token rate as if they were the same kind of number. They are not. An API bill is pure variable cost: you pay per token, you pay nothing when idle, and the line on your invoice tracks usage almost perfectly. Self-hosting is the opposite — it is mostly fixed cost. You rent the GPU by the hour or the month, and the meter runs whether your model is answering ten thousand requests or sitting at zero load overnight.
That difference changes the entire question. With an API you ask "what is my cost per token?" and the answer is on a price page. With self-hosting the cost per token is an output of your utilization, not an input you can look up. The same H100 that looks cheap at full saturation looks ruinous at 8% load, and most teams discover which one they have only after the first invoice.
So the real comparison is between a flat monthly commitment and a usage-proportional one. Self-hosting wins when you can keep the fixed asset busy enough that its amortized per-token cost dips below the variable rate you would otherwise pay. The rest of this guide is about finding that crossover honestly — including the costs that never show up on the GPU quote.
The costs that do not appear on the GPU quote
When a vendor quotes you a GPU, you get one number: dollars per hour. The fully-loaded cost of running an open-weight model in production is a stack of line items on top of that, and ignoring them is how break-even math gets fictional.
Walk through what actually consumes money and engineering time once you commit to serving the model yourself:
- GPU hours you do not use. You pay 24/7 for capacity sized to your peak, but traffic is spiky. Nights, weekends, and the long tail between bursts are billed at the same rate as your busiest minute.
- Over-provisioning for headroom. To avoid dropping requests at peak you keep spare GPUs warm. That headroom is pure insurance you pay for continuously and rarely fully consume.
- Throughput tuning. Getting decent tokens-per-second per dollar means real work — batching, KV-cache configuration, quantization choices, tensor/pipeline parallelism, picking a serving engine and keeping it current. This is specialist time, not a checkbox.
- Autoscaling cold starts. Scaling to zero to save money means multi-minute model loads when traffic returns; weights for a large model can take a long time to pull and place on device. So you either eat latency or you never actually scale down — which erases the savings.
- On-call and operations. A hosted API has an SLA and a pager that is not yours. Self-hosting means your team owns uptime, driver and CUDA upgrades, node failures, and 3am incidents.
- Model upgrades and eval re-runs. Every time you swap or fine-tune a model you re-run your evaluation suite, re-tune serving, and re-validate prompts. Hosted providers absorb the upgrade treadmill; you absorb it yourself.
- Storage, egress, and networking. Weights, checkpoints, logs, and cross-zone traffic are small individually and meaningful in aggregate.
Utilization is the whole game
Here is the calculation that decides everything, and it fits on one line. Your real cost is not the GPU rate — it is: effective cost per token = total monthly infra + ops spend / tokens actually served that month.
Run a concrete case. Suppose you rent a single high-end inference GPU at roughly $2.50/hour. Held 24/7 that is about 730 hours, or near $1,825/month for the hardware alone. Say that GPU, when fully saturated, could serve on the order of a few thousand output tokens per second — call it a generous 3,000 tok/s sustained. At 100% utilization for a full month that is about 7.8 billion output tokens, and the effective cost lands near $0.23 per million output tokens. That looks fantastic.
Now apply reality. Almost no production workload runs a single GPU at 100% saturation around the clock — that would mean a perfectly full batch queue every second of every day. At 10% effective utilization (a spiky interactive product that is busy during business hours and quiet otherwise), you served roughly 780 million tokens for the same $1,825, and your effective cost is about $2.34 per million output tokens — a 10x jump from changing nothing but how busy the box was. At 3% utilization, which is common for a young feature, you are near $7.80 per million, and that is before you have added a single dollar of ops cost or any input-token processing.
The lesson is blunt: a self-hosted GPU bills you for time, but value is created only when it is serving tokens. The gap between those two is your effective cost, and it is enormous at the utilization levels most teams actually run.
The number you are actually competing against
When people imagine "the API is expensive," they are usually picturing frontier pricing — Claude Opus 4.7 or GPT-5.5 at $5/$25 and $5/$30 per million tokens. But you would not self-host to replace a frontier model; you would self-host an open-weight model of moderate size. The fair comparison is against the hosted rate for a model in that same capability tier, and in 2026 those rates have collapsed.
Look at what the budget and hosted-open-weight tiers actually cost per million tokens (input / output):
- DeepSeek V4 Flash — 0.14 / 0.28. Output at 28 cents per million tokens.
- Gemini 2.5 Flash-Lite — 0.10 / 0.40. Input at a dime per million.
- GPT-5.4 nano — 0.20 / 1.25.
- Mistral Large 3 — 0.50 / 1.50, and Grok 4.1 Fast — 0.20 / 0.50.
Why those budget tiers end the argument
Compare those rates to the worked example above. A self-hosted GPU at 10% utilization cost about $2.34 per million output tokens, with input processing and ops still unaccounted for. DeepSeek V4 Flash charges $0.28 for the same output, fully managed, with no idle billing, no on-call, and no upgrade treadmill. You are not beating those prices by renting a GPU and running it part-time — you would have to run it nearly flat-out, all the time, just to reach parity, and then keep ops cost from eating the rest.
This is the single fact that flips most self-hosting business cases. The competitor is not $25 output tokens. It is 28-cent output tokens that someone else keeps online for you. Capability-wise these budget tiers are not frontier models, so do not assume parity — run your own evals on your data before switching. But on price alone, run your numbers against these tiers in the migration simulator before committing to hardware.
Where self-hosting genuinely wins
Self-hosting is not a mistake — it is a tool with a narrow but real fit. Cost is rarely the reason it wins; the reasons are usually constraints that an API cannot satisfy at any price. The honest cases:
- Strict data residency and compliance. If contractual or regulatory rules forbid sending data to a third-party endpoint — certain healthcare, defense, or sovereign-data situations — then "the API is cheaper" is irrelevant. You need the weights inside your boundary.
- Very high, steady volume. If you genuinely run a GPU near saturation around the clock — a high-throughput batch pipeline, large-scale classification, an embedding or document-processing firehose — utilization is high enough that the fixed cost amortizes below hosted rates.
- Custom fine-tunes you must control. A heavily fine-tuned model on your proprietary data, where you need full control over the weights, the serving stack, and the upgrade timing, can be worth owning end to end.
- Latency and network isolation. Hard tail-latency budgets, air-gapped environments, or co-location with your data to eliminate network round-trips can justify local inference where a public endpoint cannot meet the requirement.
A break-even worksheet you can fill in
Here is a repeatable procedure. Do it on a spreadsheet before you do it on a purchase order.
Step 1 — Estimate monthly tokens. Separate input from output, because output costs roughly 5-6x input on the API side and dominates your bill. Count a representative workload over a real week and extrapolate; use the token counter on actual prompts and completions rather than guessing.
Step 2 — Price the equivalent API bill. Pick the cheapest comparable hosted model for your task (not the flashiest), and multiply your token volumes by its input and output rates. If your jobs tolerate latency, apply the batch tier for 50% off, and if you reuse a large prompt prefix, model prompt caching — both push the API number down and raise the bar self-hosting must clear. Step 3 — Compute the fully-loaded self-host cost: monthly GPU spend at your real expected utilization, plus a slice of an engineer's time for serving, on-call, upgrades, and eval re-runs. A conservative loading of even one quarter of one engineer can exceed the GPU bill itself for a single-node setup. Step 4 — compare and find the crossover. A worked case:
- Workload: 300M input + 100M output tokens / month.
- API side (DeepSeek V4 Flash, 0.14 / 0.28): 300 x 0.14 + 100 x 0.28 = $42 + $28 = $70/month, fully managed.
- Self-host side: one GPU at ~$1,825/month, plus realistically several thousand in loaded ops. Call the all-in number $3,000-5,000/month even before you confirm one node can carry the peak.
- Verdict for this volume: the API is cheaper by roughly two orders of magnitude. It is not close.
The honest verdict
For the large majority of teams, hosted APIs win on total cost of ownership, and it is not a marginal call. Below roughly the volume where you can keep dedicated GPUs genuinely busy around the clock, the budget hosted tiers — sub-dollar output pricing, zero idle billing, someone else's pager — beat a part-time GPU on every axis that matters: cost, reliability, and the engineering time you get to spend on your product instead of on a serving stack.
Self-hosting becomes worth re-examining when both conditions hold at once: utilization is high and volume is steady. One without the other is a trap. High volume on a spiky GPU still bleeds money to idle time; steady-but-low volume never amortizes the fixed cost. You need a workload that keeps the hardware near saturation continuously, plus a reason — compliance, control, or latency — that the price comparison alone would not give you.
Practical advice: start on the API every time. Instrument your real token volumes with cost monitoring, drive the bill down first with batch, caching, and a right-sized model from the cheapest-by-workload picks, and only model self-hosting once that optimized API bill is large and the utilization story is real. Most teams find that by the time they have squeezed the API properly, the GPU never pencils out — and the ones for whom it does already know it, because they are running the box flat-out.
Frequently asked questions
At what monthly volume does self-hosting an open-weight LLM beat the API?
There is no single threshold, because the answer depends on utilization, not volume alone. The honest test is: can you keep the GPU near saturation continuously? A single high-end inference GPU runs roughly $1,825/month for hardware before ops. To beat a cheap hosted tier like DeepSeek V4 Flash at 0.28 per million output tokens, that fixed cost has to amortize down to the hosted rate — which only happens at very high, steady throughput. Most teams under millions of dollars of annual token spend never reach it. Use the migration simulator with your real numbers.
Isn't self-hosting always cheaper because there's no per-token markup?
No. That intuition compares the wrong things. There is no per-token markup, but there is a large fixed GPU cost that you pay whether or not you are serving, plus ops you cannot outsource. Your effective cost per token is monthly spend divided by tokens actually served, and at the 3-10% utilization most interactive products run, that effective cost lands well above sub-dollar hosted output rates. You only escape the markup by saturating the hardware, which most workloads cannot do.
What costs do teams most often forget when budgeting for self-hosting?
The big four are idle GPU time (you pay 24/7 but serve in bursts), over-provisioning for peak headroom, on-call and ops engineering, and the upgrade-and-eval treadmill. Cold starts are a sneaky fifth: scaling to zero to save money causes multi-minute model loads when traffic returns, so teams keep GPUs warm and lose the savings. A conservative loaded-ops cost can exceed the GPU rental itself for a single node.
If I do self-host, which API price should I benchmark against?
The cheapest hosted model in the same capability tier as what you'd self-host — not a frontier model. You would not run your own GPU to replace Opus 4.7 or GPT-5.5; you'd run a moderate open-weight model, so compare against budget tiers: DeepSeek V4 Flash (0.14 / 0.28), Gemini 2.5 Flash-Lite (0.10 / 0.40), or GPT-5.4 nano (0.20 / 1.25). Then apply batch and caching discounts where they fit, which lowers the API bill further and raises the bar self-hosting has to clear.