Self-Hosted LLM vs API

One A100 80GB rents for $1,307/month whether or not a single request arrives. The same 70B-class traffic through a hosted API costs $176/month — and you still have to operate the GPU. Self-hosting is not a cost decision at this scale; it is a control decision. This calculator sizes the VRAM, counts the GPUs against peak load, prices the MLOps time, and finds the monthly token volume where self-hosting actually wins.

Model & Serving

Pick the open-weight model you would host and its quantization. VRAM drives the GPU count: weights plus quantization scale overhead plus ~15% runtime headroom.

Traffic

Why Self-Hosting Rarely Wins on Cost

The pitch for self-hosting sounds reasonable: renting a GPU costs less per hour than paying per token, so at volume you must come out ahead. The arithmetic says otherwise, because you pay for the GPU whether or not tokens flow through it. An A100 80GB at $1.79/hour for 730 hours is $1,307/month before a single request. A hosted 70B-class API serving the same traffic at $0.27 per million input tokens and $1.10 per million output tokens costs about $176/month at 432 million tokens. The GPU is not cheaper — it is 7x more expensive, because the API provider spreads that same hardware across thousands of customers while you amortize it over one workload.

What Actually Drives the Number

Model sizeFP16 VRAMINT4 VRAMCheapest viable GPUMonthly rental
8B17 GiB4.4 GiBRTX 4090 24GB$321
32B68 GiB17.7 GiBL40S 48GB$796
70B150 GiB39 GiBA100 80GB$1,307
405B868 GiB224 GiB2× MI300X 192GB$3,343

Quantization is what makes self-hosting possible at all: INT4 cuts a 70B model from 150 GiB to 39 GiB, the difference between a two-GPU node and a single A100. VRAM is only the entry ticket though. Throughput decides the real fleet size, because capacity must cover your busiest hour, not your monthly average — a 3x peak multiplier triples the concurrency you have to provision for.

The Costs That Do Not Appear on the GPU Invoice

Three items flip marginal self-hosting cases back to the API. Idle capacity: you rent 730 hours and serve bursts; utilization below 50% doubles your effective cost per token. MLOps labor: model updates, re-quantization, autoscaling policy, evaluation, and incident response typically run 4-10 engineer-hours a month — at $120/hour that is $480-1,200, often more than the GPU line itself at small scale. Evaluation drift: a quantized local model is not the API model, so quality regressions become your problem to detect. The calculator prices the first two explicitly rather than pretending they are free.

When Self-Hosting Is the Right Answer

Four situations justify it, and only one is about cost. Data residency: regulated data cannot leave your infrastructure, and no discount on an API fixes a compliance finding. Custom weights: you fine-tuned a model no provider hosts, so there is no API price to compare against. Latency and control: you need guarantees a shared API cannot offer. Scale: monthly token volume past the crossover, typically in the billions — where the fixed GPU cost finally amortizes across enough tokens that the per-token economics invert. Run your own numbers above; the answer for most teams is that the API is cheaper and the decision should be made on control, not cost.