EN ▾
Get API key

LLM Inference APIGuide

Cheapest LLM Inference API: How to Judge Real Cost

Price per token is only part of the story. Here is how to compare inference APIs on the numbers that decide your bill, with our rates as a worked example.

Updated:

A balance scale weighing token cubes against coins to compare API cost
Isometric illustration of data packets flowing from a terminal into a cloud gateway, representing an inference API call

Key points

  1. Point any OpenAI SDK at https://api.llminferenceapi.com/v1, use the model ID uncensored and send your key as a Bearer token.
  2. Two endpoints are available: POST /v1/chat/completions and GET /v1/models.
  3. Streaming, tool calling and JSON mode work through the standard request fields.
  4. A full key allows 8 concurrent requests and 300 per minute; a 429 response tells you which limit you hit.

Price per million tokens is only the start

The cheapest llm inference api is the one with the lowest cost for your workload, which is not always the lowest number on a pricing page. Two providers can list the same headline price and produce very different bills once you count output tokens, long prompts, failed calls and minimum top-ups.

Use a four-part check before you pick: the input price, the output price, what the model does with long context, and what you pay up front. This article walks through each, shows our prices as a worked example, and leaves the other providers' numbers to you. Check their current pricing and plug the figures into the same formulas.

Input versus output tokens

Nearly every LLM API bills input and output separately, and output usually costs more. Our rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens. That makes output a bit more than three times the price of input, so the mix of your traffic changes the result.

Here is how the blended price moves with the ratio of input to output tokens:

Input : output ratioCost for 1M total tokensAverage per 1M
1 : 10.5M x $0.15 + 0.5M x $0.50 = $0.325$0.325
3 : 10.75M x $0.15 + 0.25M x $0.50 = $0.2375$0.2375
10 : 1about 0.909M x $0.15 + 0.091M x $0.50 = $0.1818about $0.18
1 : 30.25M x $0.15 + 0.75M x $0.50 = $0.4125$0.4125

A summarizer reads a lot and writes little, so it sits near the 10 : 1 row. A story generator writes a lot from a short prompt and sits near 1 : 3. When you compare two providers, compute both rows for your own ratio. A provider that is cheaper on input can lose on a generation-heavy workload.

Context length changes the bill

Chat apps resend the whole conversation on every turn. If a chat grows to 20 turns, turn 20 carries all 19 earlier exchanges as input. The cost of a conversation therefore grows faster than its length.

A worked example. Each turn adds 300 tokens of user text and 300 tokens of reply, and the system prompt is 500 tokens. The input at turn n is 500 + (n - 1) x 600 + 300 tokens. Summed over 20 turns that is 20 x 800 + 600 x 190 = 130,000 input tokens, plus 20 x 300 = 6,000 output tokens. The input costs 130,000 x $0.15 / 1M = $0.0195 and the output costs 6,000 x $0.50 / 1M = $0.003, so the whole 20-turn conversation costs $0.0225.

The exact figure matters less than the shape: input dominates in long chats. A provider with a cheap input price helps you more here than one with a cheap output price. Trimming old turns, or summarizing them, cuts the biggest cost. Our context window is 100,000 tokens, prompt plus completion, so very long documents fit, but they cost input tokens every time you send them.

Hidden costs to check

  • Minimum top-up. Ours is $20, with any whole amount up to $500. A provider with a low per-token price but a large minimum can cost more for a small project.
  • Expiry. Credit that expires is credit you may waste. Ours never expires.
  • Subscriptions. A monthly fee turns a pay-per-token service into a fixed cost. Ours is pay as you go.
  • Charges for failures. Failed or refused requests are not charged here. Check that on any provider you compare.
  • Rate limits. A cheap price with a low request ceiling forces you to buy a second account or slow your pipeline. A full key here allows 8 concurrent requests and 300 per minute.
  • Payment fees and bonuses. We add +5% credit from $50, +10% from $100 and +15% from $200, so a $200 top-up gives $230.

Our rates with worked examples

All figures below use $0.15 per 1M input and $0.50 per 1M output.

WorkloadTokensCost
One chat turn: 2,000 in, 500 out2,500$0.0003 + $0.00025 = $0.00055
1,000 such turns2.5M$0.55
Summarize 10,000 articles: 3,000 in, 200 out each32M$4.50 + $1.00 = $5.50
Generate 5,000 stories: 300 in, 1,500 out each9M$0.225 + $3.75 = $3.975

Check the summarizer row: 10,000 x 3,000 = 30M input tokens, and 30 x $0.15 = $4.50. 10,000 x 200 = 2M output tokens, and 2 x $0.50 = $1.00. The total is $5.50. For the story row: 5,000 x 300 = 1.5M input, which is $0.225, and 5,000 x 1,500 = 7.5M output, which is $3.75. The total is $3.975.

The pricing page lists the rates and bonuses, and you can pay by crypto (USDT on TRC20, USDC on Base).

Measure your real cost with a script

Do not trust estimates for long. Run 50 representative prompts and let the API report the tokens. The code below prints a cost estimate from the usage field.

from openai import OpenAI

client = OpenAI(base_url="https://api.llminferenceapi.com/v1", api_key="YOUR_KEY")
IN, OUT = 0.15, 0.50   # dollars per 1M tokens

def cost(u):
    return (u.prompt_tokens * IN + u.completion_tokens * OUT) / 1_000_000

total = 0.0
for p in open("prompts.txt"):
    r = client.chat.completions.create(
        model="uncensored",
        messages=[{"role": "user", "content": p.strip()}],
    )
    total += cost(r.usage)
print("average per request: $%.5f" % (total / 50))

Multiply the average by your expected monthly requests. Do the same with each provider you are considering, and keep quality in the loop by reading a sample of answers. A cheaper model that needs two attempts per task is not cheaper.

A five-step comparison you can finish in an hour

  1. Write down your expected input and output tokens per request, from a sample of real prompts.
  2. Multiply by each provider's input and output price, per request and per month.
  3. Add fixed costs: minimum top-up, subscription, and any credit that expires before you use it.
  4. Run the same 20 prompts on each model and score the answers, so you compare cost per good answer, not cost per token.
  5. Check the limits against your peak traffic. If you need more than 8 requests at once, ask whether you can run a queue instead.

The result is a table with one row per provider and a monthly figure for your workload. That table is the real answer to the question in the title, and it stays valid until a provider changes its prices, so recheck it every few months. The framework comparison helps if you also run models on your own hardware, and the common chat API mistakes page lists errors that quietly raise bills, such as resending the same history twice.

What the cheap option cannot do

Whichever provider you choose, you can cut cost in four ways. Cap max_tokens where a short answer is enough, since output is the pricier side. Trim the system prompt and drop turns the model no longer needs. Route simple jobs, such as classification, to short prompts with strict output formats. And log tokens per feature, so you notice when one prompt template quietly doubles in size after an edit. These habits save more than switching providers for a few cents.

This service is text only. It has no embeddings, image or audio generation and no fine-tuning, so if you need those, you will pay another provider for them. It runs one open-weight model from an independent provider, tuned to answer without content refusals for lawful adult use, and it is not the official API of any model vendor. Sexual content involving minors is never allowed.

Whether it is the cheapest for you depends on whether that single model is good enough for your task. Test it for free first: new users can claim $0.50 of trial credit with one click on the API key page, no card needed. Then read the docs. If you are new to the basics, what LLM inference is covers the terms used above.

Questions and answers

What does one chat message cost?

A turn with 2,000 input and 500 output tokens costs $0.00055, so 1,000 turns cost $0.55.

Is there a monthly fee?

No. It is pay as you go from prepaid credit, and credit never expires.

Are failed requests billed?

No. Failed or refused requests are not charged.

Is the lowest price always the best deal?

No. Output share, context length, minimum top-up and answer quality all change the real cost.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key