Short answer
For most individuals and small teams, an API is cheaper until traffic is high and constant. For self hosting llm vs api decisions, the deciding variable is utilisation: a GPU you pay for around the clock costs the same whether it serves a million tokens or ten. A pay-per-token API charges only for tokens used.
Self-hosting makes sense when you need to fine-tune, when data cannot leave your network, when you must run a specific model, or when you have steady heavy volume and someone to operate the machine. An API makes sense when you want to be running in an afternoon, when usage is uneven, or when one person is doing everything.
The rest of this article gives numbers you can reproduce. It does not quote hardware or cloud prices, because those move; you will add your own quote to the formulas.
What hardware a model actually needs
The main constraint is GPU memory. Weights alone take roughly parameters × bytes per parameter:
| Model size | 16-bit (2 bytes) | 8-bit (1 byte) | 4-bit (0.5 bytes) |
|---|---|---|---|
| 8B | 16 GB | 8 GB | 4 GB |
| 32B | 64 GB | 32 GB | 16 GB |
| 70B | 140 GB | 70 GB | 35 GB |
That is the floor. You also need memory for the attention cache, which grows with context length and with the number of simultaneous requests, plus runtime overhead. Serving a 100,000-token context to several users at once can take far more memory than the weights, and the numbers depend on the model's architecture. Smaller quantised models run on a single consumer GPU; large ones need several GPUs or a rented node, plus an inference server such as vLLM or llama.cpp to batch requests.
Quantising to 4-bit saves memory at some cost in quality, and the loss varies by model and task. You have to test it on your own prompts.
The work that is not in the hardware quote
Hardware is the visible cost. The less visible part is operations:
- Setup. Drivers, CUDA versions, an inference server, an OpenAI-compatible layer, authentication and a reverse proxy. A first working setup often takes a day or more; a production one takes longer.
- Tuning. Batch sizes, context limits, memory settings and sampling defaults decide whether you serve 2 users or 20.
- Updates. New model versions, security patches and inference-server releases arrive regularly and sometimes break things.
- Monitoring. Someone has to notice when the GPU runs out of memory at night.
- Idle time. A machine that sits unused still costs power or rent.
Put an hourly value on your time and add roughly four to eight hours a month of upkeep. That number often outweighs the electricity bill for small deployments.
What the API costs for the same volume
This API charges $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit that never expires. There is no subscription, and failed or refused requests are not charged. Worked examples, month by month:
| Monthly tokens (in / out) | Input cost | Output cost | Total |
|---|---|---|---|
| 20M / 5M | $3.00 | $2.50 | $5.50 |
| 100M / 20M | $15.00 | $10.00 | $25.00 |
| 1,000M / 200M | $150.00 | $100.00 | $250.00 |
For a 5-to-1 input-to-output mix, 6M tokens cost 5 × $0.15 + 1 × $0.50 = $1.25, or about $0.21 per million tokens blended. Your mix will differ, so recompute it with your own averages. See the pricing page for top-up amounts and bonuses.
Find your break-even point
Add up everything you would pay each month to self-host: hardware cost divided by the months you will use it, or the rental fee; power; and the value of your upkeep hours. Call the total F. Then:
def breakeven_tokens(monthly_fixed_cost, in_share=5/6):
# blended API price per 1M tokens at a 5:1 input:output mix
blended = in_share * 0.15 + (1 - in_share) * 0.50
return monthly_fixed_cost / blended # millions of tokens per month
print(breakeven_tokens(100)) # about 480 million tokens a month
Each $100 of monthly fixed cost equals about 480M tokens on the API at that mix. If your real traffic is well below the break-even figure, which is true for most side projects, internal tools and small products, the API is cheaper. If it is far above and constant, owning the machine can win. Check that comparison using current numbers, because both sides change.
Remember that self-hosted capacity is also a ceiling. One machine serves only so many requests at once. On a full key here, 8 concurrent requests and 300 per minute are allowed, and the capacity behind them is not your problem.
What you give up with a hosted API
An API is not a free lunch, and some limits are worth stating plainly.
- One model. This service runs a single open-weight model from an independent provider, model ID
uncensored. You cannot swap it or load your own weights. - Text only: no images, audio, video or embeddings, and no fine-tuning.
- Context of 100,000 tokens, prompt plus completion.
- Your prompts leave your network. They are not used for training, but if policy requires on-premises processing, self-hosting is the answer.
In return you get streaming, tool calling and JSON mode behind the standard OpenAI interface, so existing code works with a changed base URL. Frameworks help too; our note on using open-source models with LangChain shows how to point one at an endpoint like this.
A cheap way to decide
Do not buy hardware to find out whether you need it. Run your real workload through an API first, measure tokens per month, and only then compare with a hosting quote. A one-click trial of $0.50 is available on the API key page, and the call is the usual OpenAI one:
curl https://api.uncensoredmodelhub.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Hello"}]}'
The response includes a usage object and an X-Balance-USD header, so a week of normal use gives you a real monthly figure. If that figure ends up near break-even, you have the data to decide. Setup details are in the documentation. For background on the kind of model involved, see what an uncensored AI model is.

