Self-hosting an open-weight LLM only beats a pay-per-token API when your GPUs stay busy most of the month. Using list prices checked on November 13, 2026, an 8x H100 node serving gpt-oss-120b on AWS on-demand breaks even with the same model’s API at about 54% sustained load, and that assumes benchmark-level throughput. This guide shows the formula, the tables, and the costs most calculators leave out.
Prices checked: November 13, 2026 (US list prices, USD). GPU throughput from NVIDIA’s published TensorRT-LLM benchmarks. All monthly figures use 730 hours.
Is self-hosting an LLM cheaper than an API?
Usually not, unless utilization is high. Self-hosted LLM vs API cost comes down to one ratio: what you pay for GPU hours divided by what the API would charge for the tokens those hours actually produce. Idle hours, slower real-world throughput and staff time push the break-even point up fast.
An API charges per token. A GPU charges per hour. That difference is the whole story. When traffic is steady and heavy, a rented GPU node can produce tokens for less than an API. When traffic follows business hours, spikes on launches, or drops at night, you keep paying for the node while it waits.
In the worked example below, one AWS p5.48xlarge node (8 NVIDIA H100 GPUs) serving the open-weight gpt-oss-120b model costs about $40,179 a month on-demand. The same model through a serverless API at $0.15 per million input tokens and $0.60 per million output tokens would cost about $73,873 for the node’s maximum benchmark output. So the node is cheaper only if it runs above about 54% of that maximum, every hour of the month.
The break-even formula
Break-even utilization equals monthly GPU cost divided by the API cost of the node’s maximum monthly output. If the result is above 100%, the API is cheaper even at full load. If it is 40%, the node must stay at least 40% busy around the clock to match the API.
Write it in three steps:
- Monthly node cost = hourly price x 730 hours.
- Maximum monthly tokens = output tokens per second per GPU x number of GPUs x 3,600 x 730. Add input tokens at the ratio of your workload.
- API cost of that volume = (input tokens / 1M x input price) + (output tokens / 1M x output price).
Then divide step 1 by step 3. This version compares the same model on both sides, which keeps quality out of the math. If you compare a self-hosted open model with a frontier API model instead, the result tells you about price, not about whether the cheaper option is good enough for your task.
| Input | Value used | Where it comes from |
|---|---|---|
| Hours per month | 730 | Standard cloud billing month |
| Workload shape | 1,000 input / 1,000 output tokens per request | Matches the benchmark row used below |
| Throughput per H100 | 4,685 output tokens/s | NVIDIA TensorRT-LLM, gpt-oss-120b, FP8, max-load test |
| GPUs per node | 8 | AWS p5.48xlarge and Google Cloud a3-highgpu-8g |
| API price | $0.15 input / $0.60 output per 1M tokens | Together AI serverless gpt-oss-120b list price |
Price and throughput inputs for 2026
As of November 13, 2026, an 8x H100 node lists at $55.04 per hour on AWS on-demand and $88.49 per hour on Google Cloud on-demand. Google Cloud’s 3-year committed price for the same machine is $38.86 per hour. Per GPU, that is roughly $4.86 to $11.06 an hour.
| Option (8x H100 node) | Hourly price | Per GPU-hour | Monthly (730 h) |
|---|---|---|---|
| AWS p5.48xlarge, on-demand | $55.04 | $6.88 | $40,179 |
| Google Cloud a3-highgpu-8g, on-demand | $88.49 | $11.06 | $64,598 |
| Google Cloud a3-highgpu-8g, Spot | $52.70 | $6.59 | $38,471 |
| Google Cloud a3-highgpu-8g, 3-year commitment | $38.86 | $4.86 | $28,371 |
The AWS figure comes from a third-party price tracker updated November 12, 2026; AWS’s own announcement confirms that P5 on-demand prices dropped 44% starting June 1, 2025, but AWS’s EC2 product page does not print a dollar figure. Google Cloud’s figures come from its accelerator-optimized pricing page and cover the whole VM, not just the GPUs. Spot prices can change daily, so treat that row as a snapshot.
For throughput, NVIDIA’s TensorRT-LLM performance page lists 4,685 output tokens per second per H100 for gpt-oss-120b at 1,000 input and 1,000 output tokens (FP8, four GPUs per replica). NVIDIA describes these runs as an offline maximum-throughput scenario where requests arrive with no delay. Your production numbers will be lower if you cap latency per user, run a less tuned serving stack, or see uneven traffic.
Break-even utilization by cloud and pricing model
At benchmark throughput, the AWS on-demand node needs about 54% sustained utilization to match the gpt-oss-120b API, Google Cloud on-demand needs about 87%, and a Google Cloud 3-year commitment needs about 38%. If real throughput is half the benchmark, only the committed option stays under 100%.
The maximum output for one node is 4,685 x 8 x 3,600 x 730, or about 98.5 billion output tokens a month, plus the same number of input tokens in this workload shape. At the API’s list price, that volume would cost about $73,873.
| Option | Break-even at benchmark throughput | With 0.25 engineer added | If real throughput is 50% of benchmark |
|---|---|---|---|
| AWS on-demand | 54.4% | 58.2% | 108.8% (API always cheaper) |
| Google Cloud on-demand | 87.4% | 91.3% | 174.9% (API always cheaper) |
| Google Cloud Spot | 52.1% | 55.9% | 104.2% (API always cheaper) |
| Google Cloud 3-year commitment | 38.4% | 42.2% | 76.8% |
The staffing column adds a quarter of one engineer’s time. The US Bureau of Labor Statistics lists a median annual wage of $135,980 for software developers (May 2025), so a quarter of that is about $2,833 a month before benefits. The 50% column is a sensitivity check, not a measurement.
Now apply a common traffic pattern. If the node is busy 10 hours a day on 22 weekdays, that is 220 of 730 hours, about 30%. Every row above needs more than 30% to break even, so a business-hours workload on one dedicated node costs more than the API in this example.
| Option | Cost per 1M input + 1M output at 100% load | At 30% load | API list price |
|---|---|---|---|
| AWS on-demand | $0.41 | $1.36 | $0.75 |
| Google Cloud on-demand | $0.66 | $2.19 | $0.75 |
| Google Cloud 3-year commitment | $0.29 | $0.96 | $0.75 |
Costs that do not show up on the GPU bill
The GPU rate is only part of self-hosting. You also pay for engineering time, a spare replica for failover, storage for model weights, network egress, monitoring, and re-testing every time you upgrade the model or serving stack. On small deployments these can rival the GPU bill.
- Redundancy: one node is a single point of failure. A second node for failover roughly doubles the fixed cost unless it also serves traffic.
- Engineering time: someone has to patch drivers, tune batch sizes, update the serving engine and respond to incidents.
- Commitment risk: a 3-year price is cheapest per hour, but you pay for the term even if a faster GPU or cheaper API arrives next year.
- Quota and capacity: H100 capacity is not always available in every region on demand, so check quotas before you plan around it.
- Evaluation: each model update needs a quality check against your own prompts before it goes live.
An API bundles all of this into the token price. That is why the comparison should be total cost of ownership, not GPU hours alone.
Which API are you really replacing?
Break-even depends on the API you compare against. A cheap API model, such as Claude Haiku 5.5 at $0.10 per million input tokens and $0.50 per million output tokens for prompts up to 100,000 tokens, costs less per token than every self-hosted row above at 30% load.
Many teams start this analysis because a frontier API bill is large. But a self-hosted open-weight model is a different model. If your task truly needs a frontier model, the open model may not replace it. If it does not, a smaller hosted model may cut the bill without any GPUs at all.
| Option | Price per 1M input + 1M output | Notes |
|---|---|---|
| Claude Haiku 5.5 (prompts up to 100K tokens) | $0.60 | Higher rates apply above 100K-token prompts |
| gpt-oss-120b serverless API | $0.75 | Together AI list price |
| Claude Sonnet 5.5 | $12.00 | $6.00 with the Batch API’s 50% discount |
| Self-hosted gpt-oss-120b, AWS on-demand, 30% load | $1.36 | From the table above, benchmark throughput |
Two API features also move the line. Anthropic’s Batch API halves input and output prices for work that can wait, and prompt caching reads cost $0.10 per million tokens on Sonnet 5.5 versus $2 for fresh input. If much of your traffic is repeated context or overnight jobs, the API’s effective price may be far below its headline rate.
When self-hosting still makes sense
Self-hosting is easier to justify when traffic is steady around the clock, when you can commit to capacity for years, or when data residency, air-gapped networks or pinned model versions are hard requirements. In those cases, budget it as a cost of control rather than a guaranteed saving.
| Situation | Leans toward | Why |
|---|---|---|
| Traffic mostly during business hours | API | About 30% utilization is below every break-even row above |
| 24/7 steady volume above 50% of node capacity | Self-host can win | Fixed cost spreads across more tokens |
| Strict data residency or no internet access | Self-host | A requirement, not a price decision |
| Work that can wait hours | Batch API | 50% discount without managing GPUs |
| Frequent model upgrades wanted | API | No re-deployment or re-tuning work |
Checklist before you buy GPU capacity
Before you commit, measure your real token volume per hour for at least a few weeks, run your own throughput test at your latency target, and compare against the cheapest API model that passes your quality bar. Then plug those numbers into the formula above.
- Export one month of API usage and split it into input, output and cached tokens by hour.
- Calculate average and peak utilization a single node would see under that traffic.
- Benchmark your target model on your serving stack with your real prompt lengths and a per-user latency limit.
- Price at least three options: on-demand, Spot, and a 1- or 3-year commitment.
- Add a failover replica, engineering time, storage and egress.
- Re-run the API side with Batch API and prompt caching where your workload allows.
- Recheck list prices on the day you decide, since GPU and API prices both change often.
Sources
- Anthropic: Claude API pricing
- Google Cloud: accelerator-optimized VM pricing
- AWS News Blog: up to 45% price reduction for NVIDIA GPU instances
- AWS: Amazon EC2 P5 instances
- Vantage: p5.48xlarge price tracker
- NVIDIA TensorRT-LLM: performance overview
- Together AI: pricing
- US Bureau of Labor Statistics: software developers
FAQ
At what volume does self-hosting an LLM become cheaper than an API?
It depends on GPU price, real throughput and the API you compare against. In this example, an AWS on-demand 8x H100 node must produce more than about 54% of its benchmark output every hour of the month to beat the gpt-oss-120b API. That is about 54 billion output tokens a month plus matching input.
How much does an H100 cost per hour in 2026?
As of November 13, 2026, list prices work out to about $6.88 per GPU-hour on AWS on-demand (p5.48xlarge) and about $11.06 on Google Cloud on-demand (a3-highgpu-8g). Google Cloud’s 3-year commitment brings it to about $4.86. Specialist GPU clouds often list lower hourly rates.
Is a Spot GPU instance good for LLM inference?
Spot can be cheaper, but the provider can reclaim the instance and prices can change daily. It suits batch jobs or extra capacity behind a stable baseline, not a single node that serves all production traffic.
Does prompt caching change the self-hosted LLM vs API cost math?
Yes. On Claude Sonnet 5.5, cache reads cost $0.10 per million tokens versus $2 for standard input. If a large share of your input is repeated context, the API’s effective price drops, which raises the utilization a self-hosted node needs to compete.
Why are benchmark throughput numbers higher than what I see in production?
NVIDIA’s published numbers come from a maximum-load test with requests queued back to back. Production systems often limit latency per user, use different prompt lengths and see uneven traffic, all of which lower sustained tokens per second.
Pingback: Claude Prompt Caching Cost: 5-Minute vs 1-Hour Math
Pingback: AWS Pricing Calculator vs Real Bill: 6 Costs It Misses