LIVE · Thursday 3 December

Self-Hosting an LLM vs API Cost for AI Agents: The Break-Even in Tokens per Month, Calculated (Nov. 2026)

Priced on agent traffic, which is mostly cached input, two rented H100s must carry 4.4 billion tokens a month to beat Claude Opus 5.5 and can never beat a cached open-model API. Here is the math and when self-hosting still wins.

By Thomas10 min read

Self-hosting an open model for your agents beats paying API prices only against frontier models, at sustained volume, and almost never against a hosted open-weight API. Priced on a realistic agent mix (95% input, most of it cache reads), two rented H100s running gpt-oss-120b cost about $8,400 a month with staff time, and break even at roughly 4.4 billion tokens a month against Claude Opus 5.5 and 8.8 billion against Claude Sonnet 5.5. Against the same gpt-oss-120b on Fireworks' serverless API, with its cached-input rate, the break-even is 133% of what the cluster can physically serve. Pricing on output tokens alone, as most break-even analyses do, makes the frontier break-even look ten times lower than it is.

Why agent traffic changes the break-even analysis

The usual self-hosting vs API cost comparison divides a monthly GPU bill by the API's price per million output tokens. That works for a chatbot that writes long answers. Agents do something else: on every step they resend the system prompt, the tool definitions, the conversation so far and whatever the last tool returned, then generate a short reply or a tool call.

The clearest public record of that shape is the uncompressed baseline arm in Parsec's own coding-agent benchmark, published per task in its repository and re-runnable from it (Parsec built and ran the benchmark, and no independent re-run has been published). Across 100 SWE-bench tasks, plain Claude Code made 5,325 model calls and sent 312 million input tokens, of which 97.4% were cache reads, while generating 3 million output tokens. Output was under 1% of all tokens. Each call carried about 58,600 tokens in and 563 out.

API providers price that traffic very differently from output. Anthropic's pricing page lists cache hits on Opus 5.5 and Sonnet 5.5 at 0.05x the base input price: $0.20 and $0.10 per million, against output at $20 and $10. OpenAI's pricing page discounts cached input on gpt-6.1-terra to $0.05 from $1.00. Fireworks charges $0.015 for cached input on gpt-oss-120b against $0.15 uncached. So the right price to divide by is a blended one.

The break-even formula, with input, cached input and output priced separately

The formula is:

Break-even tokens per month = (monthly GPU cost + monthly staff cost) ÷ blended API price per token

where the blended price = (uncached input share × input price) + (cached share × cached price) + (output share × output price).

This analysis uses a mix less extreme than the benchmark above: 95% input and 5% output, with 80% of input served from cache. Per million tokens that is 190,000 uncached input, 760,000 cache reads and 50,000 output. On that mix, list prices give a blended rate of $1.91 per million on Opus 5.5, $0.96 on Sonnet 5.5, $0.48 on gpt-6.1-terra, $0.17 on gpt-oss-120b at Together (whose pricing page lists no cached rate), and $0.07 on gpt-oss-120b at Fireworks.

The self-hosted side is two H100 SXM GPUs at RunPod's Secure Cloud rate of $4.39 an hour, as RunPod listed it on November 12, 2026: $6,409 for a 730-hour month. Staff time is an assumption, 20 hours a month at $100 an hour, or $2,000. Total: $8,409 a month.

Compared against Blended $/M on agent mix Break-even tokens/month Share of cluster capacity
Claude Opus 5.5 (frontier) $1.91 4.4 billion 4.9%
Claude Sonnet 5.5 $0.96 8.8 billion 9.7%
OpenAI gpt-6.1-terra (mid-tier) $0.48 17.6 billion 19.4%
gpt-oss-120b on Together $0.17 48.8 billion 53.8%
gpt-oss-120b on Fireworks $0.07 120 billion 133%

Capacity comes from a published vLLM benchmark of gpt-oss-120b on two H100 SXM cards: with async scheduling and tensor parallelism, a 4,000-token-prompt workload that was 97% input ran at 34,491 tokens a second, or about 90.6 billion tokens in a month of full load. Divide by Opus 5.5's $20 output price instead of the blended rate and the break-even drops to 420 million tokens, which is the number an output-only analysis would print.

Two caveats cut in opposite directions. That benchmark used random prompts with no shared prefixes, and vLLM's prefix caching reuses KV-cache blocks across requests that share a prefix, avoiding what its design doc calls "redundant prompt computations", so a real agent workload may get more out of the same GPUs. How much more has not been measured. Against that, the Opus and Sonnet rows compare a 120-billion-parameter open model with frontier models, which is a change in quality, not a like-for-like saving.

Utilisation is what you are really buying

A rented GPU costs the same whether it is busy or idle, so cost per token depends almost entirely on how much of the month it works.

Average utilisation GPU only, $/M tokens GPU plus staff, $/M tokens
10% $0.71 $0.93
30% $0.24 $0.31
60% $0.12 $0.15
100% $0.071 $0.093

At full load and GPU cost alone, the cluster's $0.071 per million is level with Fireworks' blended $0.07 for the same model. It gets no better than that, and any idle hour, any staff hour, makes it worse.

Agent traffic tends to be bursty, and if your agents serve people during office hours, an always-on cluster cannot average more than 23.8% utilisation: 40 working hours out of 168 in a week. No public, measured hourly utilisation curve for agent fleets exists, so the only reliable curve is your own, logged from your API usage by hour. At 23.8%, the cluster beats Opus 5.5, Sonnet 5.5 and gpt-6.1-terra on paper, and loses to both hosted gpt-oss-120b offers.

Latency under batching, multiplied across agent steps

The utilisation table assumes the GPUs run flat out, and that has a cost of its own. Batching many requests together is what makes self-hosting cheap, and it slows every individual request.

The same gpt-oss-120b benchmark shows the trade. Run saturated on ShareGPT prompts, the server produced 7,648 output tokens a second, with a mean time to first token of 4.6 seconds and 86.5 milliseconds per output token per stream, about 11.6 tokens a second for each user. Held to four concurrent requests, the first token arrived in 38 milliseconds and each stream ran at 5.75 milliseconds per token, but total throughput fell to 8.3% of the saturated figure.

Agents pay that latency once per step. At the 563 output tokens per call seen in the benchmark trace, a saturated server takes about 53 seconds per step, or 4.4 minutes for a 5-step run and 17.8 minutes for a 20-step run. The low-concurrency setting takes 3.3 seconds per step: 16 seconds for 5 steps, 66 seconds for 20. If you run the cluster at that low-latency setting, cost per token rises roughly twelvefold, to about $1.12 per million including staff, which is more than Sonnet 5.5's blended rate. That estimate applies a ratio measured on chat prompts and has not been measured on agent prompts.

A worked example: 3,000 agent runs a day

Put the pieces together for one fleet. Assume 3,000 tasks a day, every day, with 12 model calls per task. Each call sends 11,400 input tokens, 9,120 of them cache reads, and returns 600 output tokens, the same mix as above. That is 1.08 million calls and 12.96 billion tokens a month.

At list prices, the month costs $24,780 on Opus 5.5, $12,390 on Sonnet 5.5, $6,195 on gpt-6.1-terra, $2,236 on gpt-oss-120b at Together and $906 at Fireworks. The two-H100 cluster costs $8,409 whatever happens, and would run at 14.3% average utilisation.

So the cluster beats Opus 5.5 and Sonnet 5.5 on paper, if gpt-oss-120b is good enough for every step, and costs about nine times as much as buying the same model from Fireworks. If all the runs fall in working hours, the cluster must sustain about 20,800 tokens a second while the office is open, 60% of its throughput ceiling, which is the heavily batched regime where each step takes tens of seconds. Holding latency down at that volume would take more GPUs, and the cluster's cost would rise with them.

The fourth option: specialise the repeated steps

Most agents spend many calls on narrow, repetitive work: classifying an input, extracting fields, choosing the next tool. Those steps do not need a 120-billion-parameter model, and they are where a small fine-tuned model can be costed on its own.

Training is cheap. Together's pricing page lists supervised fine-tuning of Qwen3.5 9B at $0.34 or $0.38 per million training tokens, in two tables it does not label; 10,000 examples of 2,020 tokens over three epochs comes to about $21 to $23. Serving is where the idle-GPU problem returns. Together's deployment docs say dedicated endpoints bill "per minute per running replica, even when idle," and do not mention serverless per-token inference for fine-tuned models, so one H100 endpoint at $5.49 an hour is about $4,008 a month. Fireworks can serve LoRAs on supported base models serverless, "billed per token, with no deployment to manage," but its docs say that is in preview and "available on request," and they give no price for it. Its size-based serverless tier for base models of 4 to 16 billion parameters is $0.20 per million tokens, input and output alike; the figures below assume a specialist would be billed at that tier.

For a step with 2,000 input and 20 output tokens, uncached, that works out per 1,000 calls to $0.40 at the Fireworks tier, against $4.20 on Sonnet 5.5, $0.21 on Haiku 5.5 and $0.11 on OpenAI's gpt-5-nano. A specialist therefore wins on price against a mid-tier model and loses to the cheapest frontier-lab models. What it can win on is accuracy for that one step, which has to be measured on a held-out set of your own requests, not assumed. On a dedicated endpoint the same specialist only breaks even against Sonnet 5.5 at about 954,000 calls a month.

Parsec, a small language model lab, sells this approach as a managed service: it post-trains models on a customer's traffic, routes each turn to them, runs them "alongside other teams' on an optimized cluster" so there is no GPU to keep busy, and sends low-confidence requests to a closed frontier model. Its routers page claims "Savings on real workloads: 60%" without defining the workload or baseline. It publishes no price for the service, and its pages do not mention VPC or on-premises hosting for it.

Requirements that are not about cost

Some teams self-host whatever the arithmetic says, and those reasons should be priced separately rather than counted as savings. Residency has a price on the API side too: Anthropic charges 1.1x for US-only inference, and Fireworks 1.5x for region-restricted deployments. Version pinning is the other common reason. Anthropic promises "at least 60 days' notice" before retiring a public model, and is retiring Claude Sonnet 4.5 on November 30, 2026, two months after deprecating it; weights you host do not retire. Provider independence can be had without GPUs, since gpt-oss-120b is sold by several hosts at similar rates.

Checklist before you rent a GPU

  1. Measure: two weeks of usage split into uncached input, cache reads, cache writes and output, by hour of day.
  2. Discount: turn on caching for stable prefixes and move anything that can wait to batch, then recompute the blended rate.
  3. Test quality: set a pass mark, then run a hosted open model on your own tasks against it.
  4. Price the requirements: residency multipliers, retirement dates, and whether independence is worth a cluster.
  5. Rent only if measured volume, at a utilisation you can hold with acceptable latency, clears the break-even for the model you would replace. If it does not, stay on the API.

Bottom line

If your agents run on a frontier model and you have not measured your traffic, stay on the API and turn on prompt caching and batch first: the break-even on agent traffic is in the billions of tokens a month. If an open model is good enough, buy it from a hosted API with a cached-input rate before renting GPUs; on these numbers a self-run cluster cannot beat it. Rent GPUs only if your measured volume, at a utilisation you can sustain at acceptable latency, clears the break-even against the model you would really use, or if residency, pinning or independence require it. For narrow, repeated steps, test a small specialised model on your own data and keep it only where it measurably matches.

Sources

More in Chips & Compute

All Chips & Compute →