Contact, if you are interested in this website / domain name / sponsorship / advertisement / partnership

Self-host vs API calculator

Compare paying per token with renting GPUs to serve an open-weight model yourself. Enter your monthly volume, a GPU price and a throughput you've measured; the calculator finds the break-even point.

Defaults are examples, not quotesReplace them with your own numbers

Your volume

API option

Self-host option

Example rate for a rented data-center GPU; use your quote.

Measured at your expected concurrency. This example value is not a benchmark.

50%

Real traffic has peaks and quiet hours; 30-60% is common.

At your volume

API, per tokenSelf-host, per replicaYour volume

Capacity counts input tokens at a tenth of an output token, because processing a prompt is much cheaper than generating text. That ratio is an assumption; adjust throughput if your prompts are very long.

Close to the line either way? Get an independent review of the numbers, serving stack and risks before you commit.

How the break-even works

The API bill grows in a straight line with volume: input tokens times the input price plus output tokens times the output price. Self-hosting is a staircase: each replica costs the same per month whether it's busy or idle, and when traffic outgrows one replica you add another.

API cost       = input × input price + output × output price
capacity       = throughput × 3,600 s × 730 h × utilization   (per replica)
replicas       = ceiling((output + 0.1 × input) ÷ capacity)
self-host cost = replicas × GPUs per replica × GPU price × 730 + ops

Break-even is the volume where the two lines cross. Below it, the API wins because you never pay for idle hardware. Above it, a well-utilized replica spreads its fixed cost over enough tokens to undercut per-token prices.

What else should decide it

  • Quality. Compare the open model you'd host against the API model on your tasks. Saving money on a weaker model can cost more in errors.
  • Data control. Regulated data or contractual limits can make self-hosting worth a premium.
  • Team. Someone has to run upgrades, monitoring and on-call. The ops figure is real money.
  • Price trends. API prices have fallen with each model generation, so rerun this when you renew hardware commitments.

Size the hardware with the VRAM calculator and read open-source vs closed LLMs for the wider trade-off.

Planning to self-host?

Get a second opinion on hardware, serving stack and break-even before you buy or rent GPUs.

  • Free and vendor-neutral: no model provider pays for placement.
  • Your details go only to partners you agree to.

Takes about 2 minutes. No sales calls unless you ask for one.

Frequently asked questions

When does self-hosting an LLM make sense?

When volume is high and steady enough to keep GPUs busy, when data must stay in your own environment, or when you need a fine-tuned or customized open model. At low or spiky volume, per-token APIs are usually cheaper because you pay nothing when idle.

Where do I get the throughput number?

Measure it: serve the model with your runtime (for example vLLM or SGLang) on the GPU you plan to use, replay realistic traffic with the concurrency you expect, and record total output tokens per second. Published benchmarks vary widely with model, quantization, prompt length and batch size.

What costs does the calculator leave out?

Engineering time beyond the monthly ops figure you enter, storage and networking, redundancy for failover, and price changes on either side. API prices have fallen repeatedly, which moves the break-even point higher over time.