Hosted vs Self-Hosted LLM Inference: True Cost Compared

The question everyone gets wrong

Every team that ships an LLM feature eventually asks: keep paying per token, or run the model ourselves? The open weights are free to download, so self-hosting feels like the obvious way to cut the bill. It often is not. The mistake is comparing one GPU's rent against the most expensive API and calling it a day. The real comparison has three options, not two, and the winner depends on volume, quality needs, and how much operational work you will own. Prices below are October 2026 snapshots.



Source: Original illustration created for NewsCarpenter.

Two different cost models

An API bills per token. When traffic is zero, the bill is zero; when traffic spikes, cost scales with usage — a structural advantage for prototypes and bursty tools.

Self-hosting bills per hour the machine exists. Whether you serve one request or a full batch queue, the GPU costs roughly the same that hour. Tokens only get cheap when you keep the GPU busy — idle GPU time is how "self-hosting is 10x cheaper" posts turn into expensive lessons.

It is a three-way choice, not a two-way one

Most debates skip the middle option — often the cheapest one:

OptionYou pay forWins whenLoses when
Frontier APIInput + output tokensFrontier quality needed; low or spiky volumeSteady high volume; strict data rules
Hosted open-weight APIInput + output tokensAn open model is good enough; lowest cost, zero opsData cannot leave your network; heavy customization
Self-hosted GPUGPU hours + power + ops timeSteady load; privacy, latency, or customization controlGPU sits idle; nobody owns inference ops

Hosted open-weight providers pool demand across many customers, reaching utilization levels a single company rarely can — which is why they can sell the same weights per token for less than your single-tenant GPU costs to run.

What self-hosting really costs

Start with the GPU. Published RunPod Secure Cloud Pods snapshots put an RTX 4090 (24 GB) at about $0.74 per hour, an L40S (48 GB) at $1.09, an A100 80 GB at $1.59, an H100 PCIe at $2.89, and an H100 SXM at $3.49. At roughly 730 hours a month, a single H100 SXM costs about $2,550 a month in rent alone — before it serves a single token.

Then add what the headline rate leaves out: storage (container disk around $0.10 per GB per month, network storage $0.05–$0.07; a stopped instance can still bill for storage), idle time (GPUs sized for peak load sit partly idle at night, and you pay for all of it), redundancy (one GPU is a single point of failure), and ops time (drivers break, GPUs fail, quantization choices cause silent regressions — estimates put ongoing ops at roughly 10–20% of a senior engineer's time). Our vLLM serving walkthrough and inference-engine comparison cover the tooling side.

What hosted inference really costs

Hosted open-weight APIs are priced per million tokens, with no infrastructure bill. Representative rates: Together AI lists Llama 3.1 8B at $0.18 per million input and output tokens, Llama 3.3 70B at $0.88 flat per million, and GPT-OSS 20B at $0.05 in and $0.20 out. DeepSeek's API lists V4.1 Flash at $0.15 in and $0.60 out per million off-peak, doubling at peak, and V4 Pro at $0.66 in and $1.98 out off-peak.

Frontier APIs sit in a different tier. One September 2026 price survey lists Claude Sonnet 5 at $3 per million input and $15 per million output tokens — a 50/50 blended $9 per million. Batching and caching can roughly halve that, but the gap to open-weight pricing is still an order of magnitude. That gap is the whole self-hosting argument: you are not trying to beat $0.88 per million. You are trying to beat $9.

Break-even math, worked out

The following is clearly labelled illustrative arithmetic from the prices above, not a measured benchmark.

Against hosted open-weight APIs: take the H100 SXM at ~$2,550 a month in rent. At 100 million tokens a month, rent alone is $25.50 per million tokens — about 29x the $0.88 hosted rate for a 70B-class model. At 1 billion tokens, rent alone is $2.55 per million — still about 3x. At 3 billion, rent alone is $0.85 per million — roughly par, before ops, storage, idle time, and redundancy. Sustaining 3 billion tokens a month on one GPU means averaging roughly 1,150 tokens per second around the clock — only possible with heavy batching and genuinely steady demand.

Against a frontier API: at a blended $9 per million, 100 million tokens a month costs $900 via API — far below the ~$2,550 GPU rent, so the API wins. At 500 million tokens, the API costs $4,500 against ~$2,550 in rent, so self-hosting wins on rent alone. Rent-only break-even lands near 280 million tokens a month; add ops, redundancy, and idle capacity, and the real crossover moves higher.

Verdict

Your situationPickWhy
Prototyping, bursty traffic, or under ~100M tokens/monthHosted APIZero fixed cost
Steady volume, open model is good enoughHosted open-weight APILowest cost, no ops burden
Steady high volume vs frontier API pricesSelf-hostedFixed cost beats per-token pricing
Data residency, compliance, or latency controlSelf-hostedControl, not cost, decides
Frontier reasoning, coding, or agentic qualityFrontier APIOpen models still lag here

How to decide

  1. Measure real volume from production logs. Spikes favor APIs; steady baselines favor GPUs.
  2. Check quality first. If an open model handles your task, hosted open-weight is the cost floor to beat.
  3. Price the full stack: rent, storage, redundancy, idle time, and ops — not rent alone.
  4. Re-run when anything moves. Prices, quality, and volume all change.

One charges for time, the other for tokens — the cheaper one is whichever matches your workload's shape. Start with the hosted open-weight tier as your baseline, and only bring inference in-house when your own numbers, not someone else's headline, say it pays. To try self-hosting hands-on, start with our Ollama quickstart before committing to a GPU bill.

Comments

Popular posts from this blog

Open-Source AI Weekly: Bonsai, GigaChat 4 Lead

Claude Claims Proof of Riemann Hypothesis After 167 Years

How to Build an AI Agent with LangGraph in 30 Minutes