Blog

LLM API Pricing Comparison (2026): 8 Models, Real Costs

Unicorn API Team · · 10 min read

LLM API pricing comparison chart showing eight models ranked by cost per task

An LLM API pricing comparison is only useful if it tells you what your workload will cost, not just what a million tokens costs. Price sheets list two or three numbers per model, but your bill depends on how long your prompts are, how long the replies are, how much of each prompt repeats, and how hard you let the model think. This article compares eight current models on Unicorn API, shows the cost of a realistic task on each, and gives you code to measure your own numbers.

All prices below come from Unicorn API, where one key and one bill cover every model. Prices are in credits. On a monthly plan a credit costs $0.01 (Starter $25, Creator $50, Studio $100, Pro $200 per month). Top-up credits cost $0.015 each and never expire. So “12 credits per million tokens” means $0.12 on a plan, or $0.18 from top-ups.

How LLM API pricing works: tokens, input, output and caching

A token is a chunk of text the model reads or writes, usually a short word or part of a longer one. A typical English sentence is a few dozen tokens. Every LLM API bills by tokens, and almost all of them split the price into separate rates:

  • Input tokens: everything you send, including the system prompt, the conversation history, tool definitions and any documents you paste in.
  • Output tokens: everything the model generates. This is usually 2x to 5x the input rate, because generation is slower and more compute-heavy than reading.
  • Cached input tokens: parts of a prompt the provider has seen recently and stored, so it can skip reprocessing them. These are billed at a steep discount.
  • Cache write tokens: on some models, storing a prompt in the cache has its own rate.

Two more things change the bill. The context window is the maximum number of tokens a model can take in one request; a large one lets you send whole codebases, but you pay for every token you send. Reasoning effort (the reasoning_effort field on all eight models here) controls how much the model works through a problem before answering. More effort usually means more generated tokens, and since Unicorn API debits the exact cost from the usage the model reports, you pay for whatever was actually generated.

That is why a per-million-token table is the start of an LLM API pricing comparison, not the end of it.

LLM API pricing comparison: 8 models side by side

Here are the current rates, sorted from cheapest to most expensive. Credits are per one million tokens. The dollar columns use the plan rate of $0.01 per credit.

ModelProviderInput (credits/1M)Output (credits/1M)Cached input (credits/1M)Input / output on a plan
DeepSeek V4.1 Flash FP4DeepSeek12240.32$0.12 / $0.24
Claude Haiku 5.5Anthropic12601.2 (write: 1.2)$0.12 / $0.60
DeepSeek V4.1 Flash FP8DeepSeek28840.84$0.28 / $0.84
GPT 6.1 TerraOpenAI603003 (write: 75)$0.60 / $3.00
Wish 1.0Sorceress1204802.4$1.20 / $4.80
Kimi K3.1 ProMoonshot16080016$1.60 / $8.00
Gemini 4 ArgonGoogle160800not listed$1.60 / $8.00
Gemini 4 Argon OpenAIGoogle160800not listed$1.60 / $8.00

A few things stand out:

  • The two DeepSeek V4.1 Flash listings are the same model at different precisions. FP4 and FP8 describe how compactly the model’s numbers are stored when it runs. FP4 is cheaper; FP8 is closer to the full-precision model. Both have a one-million-token context, tool calling and adjustable reasoning.
  • Claude Haiku 5.5 ties DeepSeek FP4 on input but not on output. At 60 credits per million output tokens it costs 2.5x more for generation, so it is cheapest when prompts are long and replies are short, such as classification or extraction.
  • Wish 1.0 sits in the middle tier with a one-million-token context, image input, tool calling and four reasoning levels. The model behind it is chosen and updated over time while the id and price stay fixed. Note that the provider serving it may use prompts and replies to improve its models, which matters if you handle sensitive data.
  • Kimi K3.1 Pro and both Gemini 4 Argon listings share the top price, though Kimi lists a cached input rate and Gemini 4 Argon does not.

The spread is wide: the most expensive output rate here is about 33x the cheapest. But rates alone still do not tell you which is cheapest for your job, so let’s price a real task.

Diagram of an LLM request split into input, cached and output tokens feeding a credit meter
Every request is billed in three parts: fresh input, cached input and output. Output usually dominates.

What a real task costs on each model

Take a common workload: summarising support tickets. Each request sends about 2,000 input tokens (a system prompt plus the ticket thread) and gets back about 500 output tokens. The formula is simple:

cost (credits) = input_tokens × input_rate / 1,000,000
               + output_tokens × output_rate / 1,000,000

Applied to all eight models, for one request and for 10,000 requests a month:

ModelCredits per requestCredits per 10,000 requestsOn a planFrom top-ups
DeepSeek V4.1 Flash FP40.036360$3.60$5.40
Claude Haiku 5.50.054540$5.40$8.10
DeepSeek V4.1 Flash FP80.098980$9.80$14.70
GPT 6.1 Terra0.272,700$27.00$40.50
Wish 1.00.484,800$48.00$72.00
Kimi K3.1 Pro0.727,200$72.00$108.00
Gemini 4 Argon (either listing)0.727,200$72.00$108.00

At this ratio of input to output, the top tier costs about 20x the cheapest model. For GPT 6.1 Terra, more than half the cost of each request comes from the 500 output tokens, even though the input is four times longer. That pattern holds for most models in this LLM API pricing comparison: output length is the biggest lever you control.

Change the shape of the task and the ranking can shift. If you were generating 2,000-token articles from 200-token briefs, output would dominate even more, and the gap between DeepSeek FP4 (24 credits per million output) and Claude Haiku 5.5 (60) would widen to about 2.5x per request. If you were classifying long documents into one-word labels, those two would cost almost the same.

How prompt caching changes the math

Many apps resend the same large block of text on every request: a long system prompt, a product manual, a set of tool definitions, or the earlier turns of a conversation. Prompt caching lets the provider store that repeated prefix and bill it at a discount on later requests.

Consider a support assistant with a 20,000-token knowledge base in its system prompt. Each user turn adds 300 new input tokens and gets 400 output tokens back.

Claude Haiku 5.5

  • Without caching: 20,300 input tokens at 12 credits per million plus 400 output at 60 = about 0.268 credits per request.
  • With the prefix cached: 20,000 tokens at 1.2, plus 300 at 12, plus 400 at 60 = about 0.052 credits per request.

That is about 5x cheaper per repeat request. Haiku’s cache write rate is also 1.2 credits per million, so writing the prefix into the cache is inexpensive.

GPT 6.1 Terra

  • Without caching: 20,300 input at 60 plus 400 output at 300 = about 1.34 credits per request.
  • With the prefix cached: 20,000 at 3, plus 300 at 60, plus 400 at 300 = about 0.20 credits per request.

That is close to 7x cheaper. But note Terra’s cache write rate: 75 credits per million, higher than its normal input rate of 60. Writing 20,000 tokens to the cache costs 1.5 credits. If a cached prefix is reused only once or twice, the savings are small; reused dozens of times, they are large.

The cheapest per-token model is not always the cheapest per conversation. A model with a deep cached discount can beat a model with a lower list price once your prompts get long and repetitive. Any honest LLM API pricing comparison has to account for this, and most online calculators skip it.

Is there a free LLM API, and what is the cheapest LLM API?

People searching for a free LLM API or free LLM API keys usually want one of two things: a way to experiment without a credit card, or a way to run a project that never costs money. Free tiers exist at several providers, but they tend to come with low rate limits, smaller models, daily caps, or terms that let the provider train on your data. They are good for a weekend prototype and risky for anything users depend on.

The practical alternative is a cheap LLM API with no minimum spend per request. On DeepSeek V4.1 Flash FP4, the ticket summary above costs 0.036 credits, so a single credit covers about 27 of those requests. Top-up credits never expire, so a small balance can last a hobby project for a long time. You can also try any model in the browser in the chat playground before writing code.

For the cheapest LLM API by task type, using the rates in this comparison:

  • Long replies, high volume: DeepSeek V4.1 Flash FP4, with the lowest output rate here by a wide margin.
  • Long inputs, short outputs: DeepSeek FP4 or Claude Haiku 5.5, both at 12 credits per million input.
  • Repeated long prompts: DeepSeek FP4 has the lowest cached rate at 0.32 credits per million; Claude Haiku 5.5 adds a cheap cache write.
  • Quality-sensitive work on a budget: try DeepSeek FP8 before jumping up a tier. It costs about 2.7x FP4 per task but runs closer to full precision.
Two receipts comparing the cost of a request with and without prompt caching
When a long system prompt repeats, caching it cuts the cost of each follow-up request several times over.

Measure your own costs with code

The fastest way to run your own LLM API pricing comparison is to send the same real prompts to several models and read the token usage each one reports. Unicorn API’s chat endpoint is OpenAI-compatible, so existing OpenAI client code works by changing the base URL and key. Create a key on the API keys page first.

A single request with curl:

curl https://api.unicornapi.net/v1/chat/completions \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-1-flash-fp4",
    "messages": [{"role": "user", "content": "Write one sentence about unicorns."}],
    "max_tokens": 200
  }'

And a Python script that sends one prompt to four models and prints the token counts and cost of each:

import os
import requests

API = "https://api.unicornapi.net/v1/chat/completions"
HEADERS = {
    "Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}",
    "Content-Type": "application/json",
}

# Credits per 1M tokens: (input, output)
PRICES = {
    "deepseek-v4-1-flash-fp4": (12, 24),
    "claude-haiku-5-5": (12, 60),
    "deepseek-v4-1-flash-fp8": (28, 84),
    "gpt-6-1-terra": (60, 300),
}

PROMPT = (
    "Summarise this support ticket in two sentences, then list "
    "the customer's requested action:\n\n"
    "Hi, I was charged twice for my October invoice. "
    "Order #4471. Please refund the duplicate charge."
)

for model, (p_in, p_out) in PRICES.items():
    body = {
        "model": model,
        "messages": [{"role": "user", "content": PROMPT}],
        "max_tokens": 300,
    }
    r = requests.post(API, headers=HEADERS, json=body, timeout=120)
    r.raise_for_status()
    data = r.json()

    usage = data.get("usage", {})
    tokens_in = usage.get("prompt_tokens", 0)
    tokens_out = usage.get("completion_tokens", 0)
    credits = tokens_in * p_in / 1_000_000 + tokens_out * p_out / 1_000_000

    print(f"{model}: {tokens_in} in, {tokens_out} out, "
          f"{credits:.5f} credits (${credits * 0.01:.6f} on a plan)")
    print(data["choices"][0]["message"]["content"][:300], "\n")

Run it with 20 to 50 of your real prompts rather than one, then multiply the average cost by your expected monthly volume. This script ignores cached tokens, so treat its numbers as the uncached ceiling. For exact figures before you run anything, Unicorn API returns the price of a request in advance through POST /v1/models/price; the request format is in the API documentation. If you work inside an editor agent, the same models are available from Cursor, Claude Code and other tools through MCP.

Mistakes that inflate LLM API bills

  1. Comparing input prices only. Input is the headline number on many price sheets, but output often makes up most of the bill. Always compare both, weighted by your own ratio.
  2. Leaving max_tokens unset. Without a cap, a model can ramble or loop. Set a limit that fits the task.
  3. Running every request at high reasoning effort. Extra reasoning helps on hard problems and wastes tokens on easy ones. Route simple tasks to low effort and keep high effort for the requests that need it.
  4. Resending the whole conversation without caching. Long chats grow input on every turn. Keep stable content at the start of the prompt so it can be cached, and trim history you no longer need.
  5. Using one premium model for everything. A pipeline that classifies with DeepSeek FP4 and escalates only hard cases to GPT 6.1 Terra or Kimi K3.1 Pro can cost a fraction of an all-premium setup.
  6. Ignoring data terms. The cheapest option is not cheap if it breaks a privacy promise. Check each model’s page, for example the note on Wish 1.0 about prompts being used for training.
  7. Trusting a static chart. Prices change and new models arrive every few weeks. Re-run your measurement script when you consider a switch.

Which model fits your budget?

Pulling the LLM API pricing comparison together into a simple decision guide:

Budget tierModelsCost for the 10,000-ticket example (plan rate)Good fit for
Lowest costDeepSeek V4.1 Flash FP4, Claude Haiku 5.5$3.60 to $5.40High-volume summarising, tagging, extraction, first-pass routing
Low cost, higher fidelityDeepSeek V4.1 Flash FP8$9.80Coding help and general chat where FP4 output falls short
MiddleGPT 6.1 Terra, Wish 1.0$27 to $48Harder reasoning, long-context coding, image input (Wish 1.0)
Top tierKimi K3.1 Pro, Gemini 4 Argon, Gemini 4 Argon OpenAI$72Tasks where the quality difference shows up in your own tests

The method matters more than any single row. Start with the cheapest model that might work, test it on real prompts, and move up a tier only when the output is not good enough. Because every model runs under one key and one credit balance, switching is a one-line change to the model field rather than a new account and a new invoice. Browse the full model catalog for options beyond these eight, and see plans and credit prices to decide between a monthly plan at $0.01 per credit and top-ups at $0.015.

A good LLM API pricing comparison ends with your numbers, not ours. Use the table as a starting point, run the script on a sample of your traffic, and pick the model that clears your quality bar at the lowest cost per task.

Frequently asked questions

What is the cheapest LLM API right now?

Among the models on Unicorn API, DeepSeek V4.1 Flash FP4 is the cheapest at 12 credits per million input tokens and 24 per million output tokens, which is $0.12 and $0.24 on a monthly plan. Claude Haiku 5.5 matches it on input at 12 credits but charges 60 for output, so it costs more on tasks that generate long replies.

Is there a free LLM API?

Some providers offer free tiers, usually with tight rate limits, smaller models or terms that allow your data to be used for training. They are fine for experiments but rarely hold up in production. A cheap paid model is often the better route: a short request on DeepSeek V4.1 Flash FP4 costs a small fraction of one credit, and top-up credits never expire.

Why are output tokens more expensive than input tokens?

Generating text is slower and more compute-heavy than reading it, because the model produces output one token at a time. Providers price that in. Across the models compared here, output costs between 2x and 5x the input rate. That makes reply length, and reasoning effort, the biggest levers on most bills, more than prompt length.

How do I estimate my LLM API costs before shipping?

Run a sample of real requests, record the input and output token counts from the usage field, and multiply by each model's per-million prices. Then scale by your expected monthly volume. On Unicorn API you can also get the exact price of a request before running it with POST /v1/models/price, which removes the guesswork for one-off jobs.

Does prompt caching really save money?

Yes, when a large part of your prompt repeats across requests, such as a long system prompt or a reference document. Cached input on Claude Haiku 5.5 costs 1.2 credits per million versus 12 for normal input, and GPT 6.1 Terra drops from 60 to 3. In the worked example in this article, caching makes repeat requests about 5x to 7x cheaper.