Price your workload, not the rate card. The cheaper model for a product that mostly reads can be the dearer one for a product that mostly writes.

What does it cost per million tokens to run open-source LLMs, and how does that compare with my closed model? A single rate per model cannot answer that. Your bill depends on two rates and on how much of each you use.

What open models cost per million tokens on our API

An open model, also called open-weight, is one whose trained weights are published, so any provider can serve the same model. DeepSeek, for example, publishes DeepSeek V4.1 Flash under the MIT licence. Z.ai publishes the GLM-5.3 weights on Hugging Face.

We are Lyceum, a sovereign European AI inference provider for open-source models: a European company that runs open models on GPUs in European data centres. Our serverless models, the ones you call per request while we run the GPUs, run in Paris and Finland. You call any open model in our catalogue through one OpenAI-compatible API, billed per token with no base fee.

Every model has three prices. Input is what you send. Output is what the model writes back. Cached input is a lower price for text you already sent. When a prompt starts with the same text as a recent request, that repeated start is billed at the cached price. You control it by keeping that start identical.

ModelModel IDInputCached inputOutput
GLM-5.3 Flashz-ai/glm-5.3-flash$0.20$0.05$0.50
DeepSeek V4 Flashdeepseek/deepseek-v4-flash-0731$0.25$0.06$0.30
MiniMax M3minimax/minimax-m3$0.40$0.10$2.00
Qwen3.8 27Bqwen/qwen3.8-27b$0.40$0.10$2.40
DeepSeek V4.1 Flashdeepseek/deepseek-v4.1-flash$0.50$0.13$1.50
GLM-5.3z-ai/glm-5.3$1.40$0.26$4.40
DeepSeek V4 Pro 0813deepseek/deepseek-v4-pro-0813$2.00$0.50$4.00
Kimi K3moonshotai/kimi-k3$3.00$0.75$15.00

US dollars per million tokens, list prices read from each model's page on 4 November 2026. The model roster and its price changes are tracked separately.

Output costs more than input on every model in the table, up to six times as much on Qwen3.8 27B. So the same model can be cheap for one product and expensive for another.

Why the input-to-output ratio decides your cost per million tokens

Cost per million tokens is a blend of the input and output rates, weighted by how many of each you use. A table that shows one rate per model cannot tell you that blend.

Take two hypothetical workloads, both priced at the list prices above:

  • Workload A, a document assistant. It reads long files and answers briefly. It uses 50 million input and 5 million output tokens a month (10 to 1).
  • Workload B, a drafting tool. It gets a short brief and writes long text. It uses 5 million input and 20 million output tokens a month (1 to 4).

The arithmetic is the same for every model:

monthly cost       = input tokens x input rate + output tokens x output rate
cost per 1M tokens = monthly cost / (input tokens + output tokens)

GLM-5.3, workload A:  50 x $1.40 + 5 x $4.40  = $70.00 + $22.00 = $92.00
GLM-5.3, workload B:   5 x $1.40 + 20 x $4.40 =  $7.00 + $88.00 = $95.00
ModelA: per monthA: per 1M tokensB: per monthB: per 1M tokens
MiniMax M3$30.00$0.55$42.00$1.68
DeepSeek V4.1 Flash$32.50$0.59$32.50$1.30
GLM-5.3$92.00$1.67$95.00$3.80
DeepSeek V4 Pro 0813$120.00$2.18$90.00$3.60
Kimi K3$225.00$4.09$315.00$12.60

Calculated example with hypothetical token counts, at list prices of 4 November 2026, without caching or reasoning tokens.

The cheapest model is not the same for both workloads. MiniMax M3 is cheaper than DeepSeek V4.1 Flash for the document assistant, and dearer for the drafting tool. GLM-5.3 beats DeepSeek V4 Pro 0813 on workload A and loses on workload B.

Calculated example, US dollars per month at list prices of 4 November 2026. Workload A, 50 million tokens sent and 5 million back: GLM-5.3 92 dollars in purple, DeepSeek V4 Pro 0813 120 dollars. Workload B, 5 million sent and 20 million back: GLM-5.3 95 dollars, DeepSeek V4 Pro 0813 90 dollars in purple. Purple marks the cheaper model in each workload.
In this calculated example, GLM-5.3 is the cheaper model when you mostly send tokens, and DeepSeek V4 Pro 0813 when you mostly get them back.

The example does not show quality, speed or caching. It only shows that a ranking by price needs your own ratio.

How prompt caching, context and reasoning tokens change the rate

Prompt caching means the provider reuses the work it did on the start of an earlier, identical prompt. We bill those repeated prompt starts at the cached input price, where a model lists one.

On every model in the table, caching is automatic. When requests share an identical start, the shared part is billed at the cached rate. Keep the stable part of your prompt, such as the system prompt and the documents, at the front.

Now suppose, as a calculated example, that 60% of workload A's input repeats and hits the cache:

GLM-5.3, workload A, 60% of input cached:
20 x $1.40 + 30 x $0.26 + 5 x $4.40 = $28.00 + $7.80 + $22.00 = $57.80

That is $57.80 a month instead of $92.00. A hit is best effort, though. The prefix, meaning the repeated start of your prompt, is kept in the GPU's working memory. It stays there only until newer requests need the space. In our own test calls, quick follow-ups almost always found the cache. After a pause of one to three minutes, it was hit or miss.

Calculated example for workload A on GLM-5.3 at list prices of 4 November 2026. Without a cache: fresh input 70 dollars plus output 22 dollars, 92 dollars a month. With 60 percent of the input cached: fresh input 28 dollars, cached input 7.80 dollars in purple, output 22 dollars, 57.80 dollars a month.
In this calculated example, serving 60% of the input from our cache brings the GLM-5.3 bill from $92.00 to $57.80 a month; the output cost stays the same.

Context length works through the same price. The context window is the most text a model can read in one request, and a long conversation fills it. A coding agent resends its whole history every turn. Take one GLM-5.3 agent turn from our engineering post on routing. It has 40,000 tokens of history (cached input), 2,000 new tokens (fresh input) and 1,000 tokens of output. It costs $0.0176 on a cache hit. On a miss it costs $0.0632, about 3.6 times as much, because all 42,000 tokens are billed as new input.

On 1 October 2026 we changed how GLM-5.3 requests are sent to our GPUs. Each turn now goes, where it can, to a GPU that still holds the conversation, so it is read again less often. That saves GPU time, and we passed it on in the prices. Since then, GLM-5.3's cached input costs 41% less, its input 20% less and its output 2% less. Cached input went from $0.44 to $0.26 per million tokens.

Reasoning tokens are the other hidden line. A reasoning model first writes a trace of its thinking, and that trace counts as output tokens when reasoning is on. You can turn it off with reasoning_effort: "none". Qwen3.8 27B also comes as a separate model ID, Qwen3.8 27B Instant: the same model at the same price, without the reasoning step.

Measure your output tokens with reasoning on before you price a workload. A short visible answer can carry a long, billed trace.

Comparing an open model with the closed model you use today

Price is only half of a switch, so start with quality. Epoch AI, a research group that tracks AI progress, scores models on one capability index. Since January 2026, the best open-weight models have reached the score of the best closed models about four months later, on average. So an open model today is roughly where the leading closed models were four months ago. That gap is small enough to make the price comparison worth doing.

To compare prices, run your closed model through the same formula:

  1. Take its input, cached input and output rates from its provider's own pricing page, on the day you compare.
  2. Check whether that page charges extra for long prompts, or for storing text in its cache, and add those charges if your workload triggers them.
  3. Use the same monthly token counts you used for the open models.
  4. Count reasoning tokens on both sides, and check how each provider bills them.

Pair models by your own evaluation, not by price. A cheaper model that fails your test set saves nothing.

The same open model at different providers

Because open weights can be served by anyone, you can price the same model at several providers. Compare the exact model ID and the context window, not only the name.

On 4 November 2026, Groq's models page listed Qwen3.8 27B at $0.80 per million input tokens and $4.00 per million output tokens. It showed a 131,072-token context window and no cached-input price in that row. We serve Qwen3.8 27B at $0.40 input, $0.10 cached and $2.40 output, with a 256K-token window.

On the same day, the IONOS AI Model Hub listed Qwen3.8 27B at $0.45 input and $2.70 output per million tokens. TensorX listed GLM-5.3 at $1.75 input, $0.44 cache read and $4.50 output.

At those listed rates, workload A costs:

  • Qwen3.8 27B: $32.00 a month with us, $60.00 at Groq, $36.00 at IONOS.
  • GLM-5.3: $92.00 a month with us, $110.00 at TensorX.

Estimating your own cost per million tokens

API responses already carry the numbers you need to price your own traffic. Each response reports its input and output tokens, and the cached part of the input. Here is a sketch that prices one request with the OpenAI SDK pointed at our API:

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.lyceum.technology/openai/v1",
                api_key=os.environ["LYCEUM_API_KEY"])

# USD per 1M tokens from the model page: input, cached input, output
RATES = {"z-ai/glm-5.3": (1.40, 0.26, 4.40)}

def request_cost(model, usage):
    rate_in, rate_cached, rate_out = RATES[model]
    details = getattr(usage, "prompt_tokens_details", None)
    cached = (getattr(details, "cached_tokens", 0) or 0) if details else 0
    fresh = usage.prompt_tokens - cached
    return (fresh * rate_in + cached * rate_cached
            + usage.completion_tokens * rate_out) / 1_000_000

resp = client.chat.completions.create(
    model="z-ai/glm-5.3",
    messages=[{"role": "user", "content": "Summarise this contract clause: ..."}])
print(f"${request_cost('z-ai/glm-5.3', resp.usage):.6f}")

The cached-token field is missing on a miss, so the sketch counts it as zero then. Run a day of real traffic, add up the costs, and divide by the tokens to get your own rate per million.

Pay per token while your traffic is uneven. Once it is steady and high, a dedicated endpoint can cost less. It is reserved for you and billed for the time it runs, not per request. Check when per-token pricing stops paying. Running the weights yourself is a separate calculation, covered in the self-hosting break-even.

Put your own monthly input and output tokens next to each model's rates on our models page.

Frequently asked questions

Does a 1M-token context window cost more per token?

The window sets how much you can send in one request. Our model pages list one input, one cached input and one output price per model. A long prompt costs more because it has more tokens.

Is prompt caching automatic, or do I have to turn it on?

It is automatic. When a request starts with the same text as a recent one, that shared part is billed at the cached input price.

Do reasoning tokens show up on the bill?

Yes, as output tokens. If a task does not need the thinking step, turn reasoning off with reasoning_effort set to none. Some models also have an Instant model ID that skips it.

Sources

  1. huggingface.co
  2. huggingface.co
  3. epoch.ai