All Labs tools

Apex36 Labs

LLM cost calculator: self-hosted vs API

By , Founder & CEO, Apex36Updated

Estimate. Prices from official pages, checked 2026-11-18

In short

For most teams the API is cheaper. A support chatbot handling 50,000 chats a month costs about $300 on Claude Sonnet 5.5 and $15 on Claude Haiku 5.5 at November 2026 list prices, while one rented L40S GPU running all month costs about $2,717 with overhead. The GPU only pays off above roughly 450,000 chats a month. Enter your own numbers below.

Start from a workload

req
10010M
tok
5050K
tok
208K

API model

GPU to rent

Verdict

The API is 9.1x cheaper at this volume

API · Claude Sonnet 5.5

$300.00

a month · 90M tokens

GPU · 1x g6e.xlarge

$2,717.06

a month · 730 h · 2.0x overhead

Per request
$0.006
Break-even
453K req
A year, API
$3,600.00
$0$1.12K$2.24K$3.36K$4.48K0306M611M917M1.22BTokens per month (click to set your volume)Break-even 815MYou
API Self-hosted GPU, with overhead GPU is cheaper here

At 50K requests a month the Claude Sonnet 5.5 API costs about $300.00 and one GPU about $2,717.06 with overhead. The GPU pays off above about 453K requests (815M tokens) a month.

List prices checked 2026-11-18. Batch discounts, long prompts, storage, networking and staff are not included.

Key facts

CostFree, no sign-up
Prices checked2026-11-18, from the official pricing pages
Covers8 API models from Anthropic, OpenAI and Google; 6 on-demand GPU instances on AWS and Azure
Your dataThe math runs in your browser. Analytics records only which model and GPU you picked, not your numbers.

Is it cheaper to use an LLM API or to self-host?

At low or uneven volume the API is cheaper, because you pay per token and nothing while idle. A rented GPU bills for every hour it runs, and DigitalOcean puts the real cost at 1.7 to 2.7 times the bare GPU price once redundancy, monitoring and staff are added. The table below works three common workloads through the same math as the calculator, at list prices checked Nov 18, 2026.

Monthly cost of three workloads through the API and on one rented GPU
WorkloadClaude Haiku 5.5Claude Sonnet 5.5Claude Opus 5.51x L40S GPUGPU pays off above
Support chatbot50,000 requests, 90M tokens a month$15.00$300.00$600.00$2,717.06453K requests
Document summaries5,000 requests, 43M tokens a month$5.50$110.00$220.00$2,717.06124K requests
Internal search100,000 requests, 225M tokens a month$32.50$650.00$1,300.00$2,717.06418K requests

API cost at list price. GPU is one AWS g6e.xlarge (L40S) running 730 hours at $1.861 an hour with a 2x overhead. Prices checked Nov 18, 2026. Break-even is against Claude Sonnet 5.5.

How does the calculator work out the cost?

It multiplies your monthly requests by the tokens in each request and the model's list price, then compares that with the GPU's hourly price times the hours it runs times an overhead multiplier. The break-even point is where the two monthly costs are equal.

  1. 1API costRequests a month × (input tokens × input price + output tokens × output price). Prices are per million tokens.
  2. 2Self-hosted costGPU hourly price × hours it runs × overhead. DigitalOcean puts the overhead at 1.7 to 2.7; it rents GPUs and also sells per-token inference, so read it with that in mind. The default here is 2.
  3. 3CapacityOne GPU serves its throughput (tokens per second) × 3,600 × hours. If your volume needs more, the calculator adds instances. Throughput is only filled in where a published figure exists.
  4. 4Break-evenThe GPU's monthly cost divided by the API cost of one request. If one fully busy GPU still costs more than the same tokens through the API, there is no break-even at that mix.

When does self-hosting an LLM make sense?

Self-hosting pays when volume is high and steady enough to keep a GPU busy, when data must stay in your own environment, when you need a fine-tuned or custom model, or when the model you want has no API. A cheap API model often beats a rented GPU outright, so run your own numbers before you buy hardware or reserve instances.

Where do the prices in this calculator come from?

Every price is the public list price from the provider's own pricing page, standard tier, in US dollars, checked Nov 18, 2026 and rechecked on the 1st of each month. GPU prices are on-demand Linux rates in us-east-1 (AWS) and eastus (Azure).

API list prices per 1M tokens
ModelInput / output
Claude Haiku 5.5Prompts up to 100k tokens$0.1 / $0.5
Claude Sonnet 5.5$2 / $10
Claude Opus 5.5$4 / $20
GPT-6 Luna$0.1 / $0.5
GPT-6.2 Sol$2 / $10
GPT-6.2 Astra$8 / $40
Gemini 3.5 Flash-Lite$0.3 / $2.5
Gemini 4 CarbonUntil 30 Nov 2026; rises to $4 / $20 on 1 Dec 2026$2 / $10
GPU on demand, per hour and per 730-hour month
InstanceHour / month
AWS g6.xlarge1x L4, us-east-1$0.8048 / $587.50
AWS g5.xlarge1x A10G, us-east-1$1.006 / $734.38
AWS g6e.xlarge1x L40S, us-east-1$1.861 / $1,358.53
Azure NC24ads A100 v41x A100 80 GB, eastus$3.673 / $2,681.29
AWS p5.4xlarge1x H100, us-east-1$6.88 / $5,022.40
Azure NC40ads H100 v51x H100 NVL, eastus$6.98 / $5,095.40

What would Apex36 build for you?

If a private deployment fits, Apex36 sets up a private LLM in your AWS, Azure or GCP account, or on your own servers, from $8,000 per deployment. That covers one use case, one model setup in your cloud account and an evaluation on your data. Running costs are billed to your own cloud and model accounts.

Frequently asked questions

Usually not at low or uneven volume. A rented GPU bills for every hour it runs, and the real cost is 1.7 to 2.7 times the bare GPU price once you add redundancy, monitoring and people. Self-hosting starts to pay with high, steady use, or when your data cannot go to a public API.

A token is a piece of a word; 1,000 tokens is roughly 750 English words. A short chat turn is often 1,000 to 2,000 input tokens once instructions and history are included, and a few hundred output tokens. Summarising a long document can be 10,000 input tokens or more.

They are estimates from official list prices, checked Nov 18, 2026. They leave out batch discounts, long-prompt pricing, storage, networking and staff, and the GPU throughput figures are published benchmarks, not tests on your workload. Use the result to decide whether a closer look is worth it, not as a quote.

No. API and GPU prices are bare list prices. The overhead multiplier (default 2) is a rough allowance for redundancy, monitoring and the people who run the GPUs. Set it to 1.0 to see the bare GPU price.

No. It compares the cost of running a model (inference) only. Fine-tuning and training are one-off or periodic costs that depend on the dataset and the method, so they need their own estimate.

Often, yes. Managed models inside your own cloud account, such as Claude on AWS Bedrock, OpenAI models on Azure or Gemini on Vertex AI, keep prompts in your cloud without running GPUs yourself, and you still pay per token. A private LLM deployment can take either route.