EN ▾
Get API key

Uncensored API. Prepaid crypto. No fluff.

LLM API Cost Comparison: Per-Token Math That Works

A fair llm api cost comparison needs one formula and your own token counts, not a glance at the headline price. This page gives the formula, worked examples at $0.15 and $0.50 per 1M tokens, and a checklist for the costs that hide behind the price list.

Updated

Isometric scale weighing glowing token cubes against coins to illustrate LLM API cost comparison

Key points

  • Price input and output tokens separately, because most workloads are lopsided toward one of them.
  • Chat history is re-sent on every turn, so input tokens grow faster than you expect.
  • Ask each provider whether refused or failed requests are billed, and whether credit expires.
  • Here, 10,000 summaries of 6,000 tokens in and 400 out cost $11.00 in total.

Why the headline price is only half the answer

Most price pages quote two numbers: a rate for input tokens (what you send) and a rate for output tokens (what the model writes back). Any honest llm api cost comparison starts by keeping those two apart. A model that is cheap on input and expensive on output is a good deal for classification and a poor one for story generation, and the reverse is true for a model with cheap output.

The second half of the answer is your own traffic. Two teams reading the same price list can end up with bills that differ by a factor of ten, because one sends 200-token prompts and the other sends a 40,000-token document with every call. So the method is simple: write down your typical request in tokens, multiply by the rates, multiply by volume, then adjust for the extras described below.

This site sells a hosted, OpenAI-compatible text API with one model, ID uncensored, at $0.15 per 1M input tokens and $0.50 per 1M output tokens. The examples use those rates because they are the only ones I can state with certainty. For other services, check their current pricing pages and drop the numbers into the same formulas.

The formula, in code

The cost of one request is input tokens times the input rate plus output tokens times the output rate, each divided by one million. Here it is as a small function you can reuse for any provider by changing the two constants.

def request_cost(input_tokens, output_tokens,
                 in_rate=0.15, out_rate=0.50):
    # rates are dollars per 1M tokens
    return (input_tokens * in_rate + output_tokens * out_rate) / 1_000_000

# one request: 2,000 tokens in, 500 tokens out
print(round(request_cost(2000, 500), 6))   # 0.00055

If you want one number to sort a spreadsheet by, compute a blended rate for your mix. When 80% of your tokens are input and 20% are output, the blended rate here is 0.8 x 0.15 + 0.2 x 0.50 = $0.22 per 1M tokens. When the mix is half and half it is $0.325 per 1M. The blended figure is only useful if the mix is measured from real traffic, so pull it from your logs after a week of testing instead of guessing.

The usage object in every response (and in the final streamed chunk when you set stream: true) gives you the exact counts to feed this function, so you never need a separate tokenizer to audit the bill.

Three worked examples

Each row below is computed from $0.15 and $0.50 per 1M. Check the arithmetic yourself; it is the same function as above.

WorkloadInput tokensOutput tokensInput costOutput costTotal
Support chatbot, 1,000 requests a day, one day2,000,000500,000$0.30$0.25$0.55
Same chatbot for 30 days60,000,00015,000,000$9.00$7.50$16.50
Batch summaries, 10,000 documents60,000,0004,000,000$9.00$2.00$11.00
One long-context call90,0002,000$0.0135$0.001$0.0145

Look at how different the shapes are. The chatbot spends about as much on output as on input. The summarizer spends most of its money on input, since each document is long and each summary is short. The long-context call is a single request that fills most of the 100,000-token window, and it still costs about a cent and a half.

The history trap in chat apps

A chat completion has no memory, so your app re-sends the whole conversation on every turn. Take a 20-turn chat where each user message is 100 tokens and each reply is 300 tokens. Turn n sends 400 x (n - 1) + 100 input tokens. Summed over 20 turns that is 400 x 190 + 2,000 = 78,000 input tokens, against only 6,000 output tokens. The bill is 78,000 x $0.15 / 1M + 6,000 x $0.50 / 1M = $0.0117 + $0.003 = $0.0147.

That is still small, but notice that the input side is thirteen times the output side. If you estimated cost from the visible text of the conversation (8,000 tokens) you would be off by a wide margin. Trimming or summarizing old turns is the single most effective way to lower a chat bill on any provider.

What to put in your comparison sheet

Price per million is one column. These are the others that change the final ranking, with notes on what this service does for each so you can fill in your own row.

ColumnWhy it mattersThis service
Input and output ratesDrives the formula above$0.15 and $0.50 per 1M
Billing modelSubscription fees are paid even in quiet monthsPrepaid credit, no subscription
Credit expiryExpiring balances turn into a hidden feeCredit never expires
Refused or failed requestsRetries multiply spendNot charged
Context windowDecides whether you need chunking code100,000 tokens, prompt plus completion
Rate limitsLow caps force queues and extra workersFull key: 8 concurrent, 300 requests per minute
Minimum top-upCash tied up before the first request$20 minimum, up to $500

Fill in the same columns for every candidate and the comparison usually settles itself. If two services land within a few percent of each other on cost, decide on the non-price columns: limits, content policy for your use case, and how the API behaves when you push it.

Costs that never appear on a price page

Refusals and retries. If a provider charges for a response that says it cannot help, and your code then rewords the prompt and tries again, you pay for every attempt. On this service refused and failed requests are not charged, which removes that line item, but it is worth asking every vendor the same question. Refusal rates also depend on your content, so measure them on your own prompts instead of trusting a general claim.

Verbosity. Output tokens cost more than input tokens here, so a model that rambles costs more. Set a clear length instruction in the system prompt, use stop sequences where the format allows, and cap max_tokens when you know the answer is short. It is optional on this API, since the completion can use whatever is left in the window, so a cap is a safety net you add on purpose.

Rate limits as a cost. A low concurrency cap means you queue work or run it slowly. A full key here allows 8 requests at once and 300 per minute, and a streamed request holds its slot until the stream ends. Over the limit you get HTTP 429 with the code rate_limited or concurrency, so build a retry with backoff before you scale up a batch job.

Engineering time. The OpenAI-compatible interface means you change the base URL and key, not your integration. That has real value when you are comparing: you can swap endpoints in an afternoon and test the cost on real traffic.

Prepaid credit or a flat monthly plan

A flat plan wins when your usage is high and steady, and loses when it is spiky or small. To find the break-even point, divide the plan fee by your blended rate. With the $0.22 blended rate from earlier, a $20 top-up covers about 90.9 million tokens at an 80/20 input to output mix. If a flat plan costs more than the pay-as-you-go total for your measured monthly tokens, prepaid wins; if it costs less and you reliably use the volume, the plan wins.

Top-ups here run from $20 to $500 in whole dollars, with a bonus of 5% from $50, 10% from $100 and 15% from $200. A $100 top-up therefore becomes $110 of credit. Payment is in crypto only, USDT on TRC20 or USDC on Base. Full details are on the pricing page.

Measure your own numbers with the trial

Instead of trusting an estimate, run a real sample. After you sign up, the API key page offers $0.50 of trial credit with one click, one per person, valid for 7 days and with no payment needed. At the earlier example of 2,000 tokens in and 500 out, one request costs $0.00055, so the trial covers roughly 900 such requests. The trial key is limited to 2 concurrent requests and 60 requests per minute, which is plenty for a sample.

Every response carries an X-Balance-USD header, so you can watch the balance fall as you send traffic and compare it with your own calculation:

import requests

r = requests.post(
    "https://api.grokunhinged.top/v1/chat/completions",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={
        "model": "uncensored",
        "messages": [{"role": "user", "content": "Summarize this ticket in two sentences: ..."}],
    },
    timeout=60,
)
print(r.headers.get("X-Balance-USD"))
print(r.json()["usage"])

Run a few hundred of your real prompts, sum the usage fields, and put the result in your sheet next to the other candidates. The quickstart shows the same call with the OpenAI SDK.

Questions and answers

Which tokens cost more, input or output?

Output. Here it is $0.50 per 1M against $0.15 per 1M for input, so long answers cost more than long prompts of the same size.

How do I estimate a monthly bill?

Multiply average input and output tokens per request by the two rates, then by monthly requests. Add history growth for chat apps, and use the usage field from a test run instead of guesses.

Do refused requests cost money?

Not on this service: failed or refused requests are not charged. Ask any other provider the same question before comparing totals.

Does the credit expire?

No. Prepaid credit never expires, and there is no subscription fee, so a quiet month costs nothing.

Start with trial credit

Email and password, key on screen right away.

Get API key

Your key is one form away

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

Get API key