Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 3 min read

How to tell if a "cheap" LLM API is actually cheaper (3-minute check)

How to tell if a "cheap" LLM API is actually cheaper (3-minute check) Every week someone posts a new gateway that claims "50% cheaper than OpenAI". Some of them are real. Many are priced in units you can't verify: 1 cre

How to tell if a "cheap" LLM API is actually cheaper (3-minute check)

Every week someone posts a new gateway that claims "50% cheaper than OpenAI". Some of them are real. Many are priced in units you can't verify: 1 credit, 1 request, 1 "unit" β€” and you only find out the real price after you've paid.

Here are the three checks I use, in order. They take about three minutes and they work on any provider, including mine.

Check 1: the per-million-token number

Ask for one thing: the price of one known model, expressed as $ per 1M input tokens and per 1M output tokens.

Not "from $0.001 per call". Not "1 credit = 10,000 tokens". Just the unit every official provider publishes.

Why this matters: model prices on the official side are public (gpt-4o input/output, claude-sonnet input/output, etc). Once a reseller states their price in the same unit, comparison is a subtraction, not a guessing game. If they can't or won't state it, that's your answer.

Check 2: the cost of getting money in

The sticker price is not what you pay. Payment processing is a fixed fee plus a percentage, and on small top-ups the fixed part dominates.

A real example from my own product: a $1 top-up through a card processor that charges 3.9% + $0.40 gives back about $0.56 of usable balance. The fee eats ~44%. On a $10 top-up the same fee is ~8%. Same product, same prices, wildly different effective cost.

So the question isn't "what's the price per token" β€” it's "what's the price per token at the amount I'm actually going to top up".

Practical rule: if you plan to spend under $20/month, the minimum top-up and the fixed fee matter more than the per-token price.

Check 3: send one request and do the arithmetic yourself

This is the only step that can't be faked.

from openai import OpenAI

client = OpenAI(base_url="https://provider.example/v1", api_key="sk-...")

r = client.chat.completions.create(
    model="some-model",
    messages=[{"role": "user", "content": "Reply with exactly: ok"}],
    max_tokens=8,
)

print(r.usage.prompt_tokens, r.usage.completion_tokens)

Now take the billed amount from the provider's dashboard for that single request, and compute:

$ per 1M input  = billed * 1_000_000 / prompt_tokens
$ per 1M output = billed * 1_000_000 / completion_tokens

Do this twice, with a long prompt and a short one. Two things show up immediately:

  • whether their published price matches what they bill;
  • whether prompt-cache discounts are real (a long repeated prompt should cost less the second time).

If the numbers drift from the price page, you found something more useful than a discount.

What to do with the three numbers

For a given model you can now compare on equal footing:

A (official) B (reseller 1) C (reseller 2)
$ / 1M input
$ / 1M output
effective cost at your top-up size
cache discount verified

The column that decides it is usually the third one, not the first two.

Disclosure: I run Tapix AI, which is one of these gateways β€” one OpenAI-compatible endpoint, 100+ models. I'm writing this because the checks above are the ones I'd want a buyer to run on us.

Two things I did to make them easy to run on me: every model's per-token price is public at tapixai.com/price-index with no login, and tapixai.com/try sends one real request so you can do Check 3 before you pay anything.

If you run the three checks on some other provider and the numbers don't match their page, post them. That's the most useful comment this post could get.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.