Posts

Self-Host vs API Cost Compare

Self-hosting an LLM beats API pricing only at high, steady volume. Compare GPU, ops and utilisation costs against real per-million rates.
Onsp
Line chart comparing monthly API spend growing with token volume against a flat self-hosted GPU cost of $2,800 per month, crossing near 700 million tokens

Self-hosting looks cheap because the marginal cost per token appears to be near zero once the hardware is paid for. The comparison only becomes honest when you price utilisation, idle time, operations and the engineering hours that keep inference running.

The break-even formula

Self-hosting wins when:

monthly_gpu_cost + ops_cost < monthly_api_spend

The hard part is ops_cost. It is not zero, and it is not small. It includes the engineer time to own the inference stack, the cost of spare capacity for failover, and the opportunity cost of that attention.

What the API charges

ModelInput / 1MOutput / 1MBlended 3:1
DeepSeek V4.1 Flash$0.30$1.20$0.52
GPT-6 Luna$0.10$0.50$0.20
Gemini 3.5 Flash-Lite$0.30$2.50$0.85
Claude Haiku 4.5$1.00$5.00$2.00
DeepSeek V4 Pro$1.32$3.96$1.98
GPT-6 Astra$10.00$50.00$20.00

Working the numbers

A single modern GPU node rented at market rates costs on the order of a few thousand dollars a month. To beat that with API spend, a workload needs to consume roughly:

break-even tokens ≈ (gpu_cost + ops_cost) / blended_price_per_token

At a blended $0.20 per million tokens and a $3,000 monthly all-in node cost, break-even sits near 15000 million tokens per month — around 5787 tokens per second sustained, twenty-four hours a day.

That is a very large workload. Most teams that assume self-hosting is cheaper are operating at one or two percent of that volume.

Utilisation is the decisive variable

API pricing is per token and scales to zero when nobody uses your product. Self-hosted hardware bills whether or not anyone is using it. At 10% utilisation, the effective cost per token on owned hardware is ten times the nominal figure. Overnight troughs, weekend lulls and launch-day spikes all cut against you, because capacity must be sized for peak while cost is amortised over average.

When self-hosting genuinely wins

  • Sustained high volume with predictable load, well above the break-even above
  • Hard data residency requirements that no API can satisfy
  • Heavy fine-tuning with a stable model version, where API churn is a liability
  • Latency-critical workloads where network round trips dominate

When it does not

  • Early-stage products with spiky, low-volume traffic
  • Teams without dedicated infrastructure engineers
  • Workloads that benefit from frontier model quality, since open weights trail the frontier
  • Anything where a cheaper API model or a better cache hit rate would solve the problem at a fraction of the effort

The honest ordering

Exhaust the cheap levers first: routing, caching, truncation, batch. Those reduce spend without capital or headcount. Only then compare the residue against hardware. If the residue is still large and steady, self-hosting becomes a real conversation.

Model both sides with your actual token volume in the calculator.

Related reading

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.