Safeguard
Research•

Self-hosted open model vs API: cost per task, with list prices

A worked break-even using list prices fetched 18 October 2026: tasks per hour a rented GPU must serve to beat a per-token API. Measure your own throughput.

Safeguard Security Team
4 min read

A rented GPU beats a per-token API only if you keep it busy. Using list prices fetched on 18 October 2026, a one-H100 instance at 3.29 dollars an hour needs about 55 tasks an hour to match a 6 cent API task, and about 1,100 an hour to match a 0.3 cent one. Measure your own throughput first.

What prices are we using?

All figures are published list prices, fetched on 18 October 2026. They change, so recheck before you decide. We make no claim about any provider's internal costs.

API list prices (Anthropic pricing page, USD per million tokens):

ModelInputOutput
Claude Sonnet 5.5210
Claude Haiku 5.5 (prompts up to 100,000 tokens)0.100.50

The same page notes a 50 percent discount on both input and output for the Batch API, which we ignore below to keep the arithmetic simple.

Rented GPU on-demand prices (Lambda pricing page, per GPU hour): one NVIDIA H100 PCIe at 3.29 dollars, and one NVIDIA A10 at 1.29 dollars. The page shows only a 2026 copyright notice with no price date, lists GPU counts through tab labels, excludes taxes, and describes access as first-come. Reserved capacity is priced separately and was not published.

What is a "task"?

Define one before you compare. We use a code review style task: 20,000 input tokens and 2,000 output tokens. Yours will differ, and the result scales with it.

What does one task cost through an API?

  • Sonnet 5.5: 20,000 input tokens at 2 dollars per million is 0.04 dollars, plus 2,000 output tokens at 10 dollars per million is 0.02 dollars. Total 0.06 dollars, or 6 cents.
  • Haiku 5.5: 20,000 at 0.10 per million is 0.002 dollars, plus 2,000 at 0.50 per million is 0.001 dollars. Total 0.003 dollars, or 0.3 cents.

What does a rented GPU cost per task?

Cost per task is the hourly price divided by tasks completed per hour. The key unknown is throughput, which no price page publishes. It depends on the model, quantization, serving software, batch size and prompt length.

So we solve for break-even instead. Tasks per hour needed to match each API price:

GPUHourly pricevs Sonnet 5.5 task (6 cents)vs Haiku 5.5 task (0.3 cents)
H100 PCIe3.29about 55 tasks/hourabout 1,097 tasks/hour
A101.29about 22 tasks/hourabout 430 tasks/hour

Always-on, 730 hours in an average month, the H100 costs about 2,402 dollars and the A10 about 942 dollars before any other cost.

How do you read that table?

Against a larger API model, a rented GPU can pay off at modest volume, provided an open model you can host does the job well enough. That "well enough" is the real question, and it is not a price question. Run your own evaluation on your own tasks.

Against a small, cheap API model, the bar is high. You would need on the order of a thousand tasks an hour of steady load on one H100 to match the list price. If your volume is bursty, you pay for idle hours.

What does this comparison leave out?

  • Engineering time: deploying, patching and monitoring a model server.
  • Idle capacity: the table assumes full use. Real use has valleys.
  • Quality: a cheaper answer that needs rework is not cheaper.
  • Data location: self-hosting can matter for residency and privacy, which is a reason independent of price.
  • Storage, networking and redundancy: a single instance is a single point of failure.
  • Discounts: reserved GPU capacity and API batch pricing both lower the numbers.

What to do

  1. Define one task with measured input and output token counts from your logs.
  2. Compute the API cost per task from the current price page.
  3. Benchmark the open model on a rented GPU and record real tasks per hour.
  4. Divide the hourly price by that throughput, then add engineering and idle time.
  5. Compare quality on a private evaluation set before you decide on cost.

Quick check

Is self-hosting always cheaper at scale?

No. It depends on utilization, model quality and engineering time. Compute break-even throughput for your task and measure it.

Why do these numbers carry a fetch date?

List prices change, and the GPU page shows no price date. Recheck both before relying on them.

Sources

Last reviewed: 18 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.