This chapter turns the architecture into a bill. GLM stands for General Language Model. An application programming interface (API) charges separately for input tokens, which it reads, and output tokens, which it generates. When a repeated prompt prefix is reused from memory, the provider can charge a lower cache-read rate. Prices here are quoted per million tokens, a billing unit rather than a required request size. The list price is $0.15 input / $0.50 output per million tokens, with cache reads at $0.03. At launch Z.ai ran a 50% discount ($0.075/$0.25, promotion ended Sep 9, 2026). GPT, where it appears in the table, means Generative Pre-trained Transformer. The comparison uses live OpenRouter data:
Which mechanisms lower the bill?
The price reflects several separate costs. Mixture-of-Experts (MoE) activates a small subset of specialist subnetworks for each token instead of all model parameters. Kimi Delta Attention (KDA) carries a fixed state instead of rereading all earlier tokens. Sparse multi-head latent attention (MLA) retains compressed token records for precise lookup. 8-bit floating point (FP8) stores each number in one byte, and multi-token prediction (MTP) lets a verified pass deliver more than one output token when the draft is accepted. In the diagram, B means billion model parameters. The bars show an illustrative blended price under a 3:1 input-to-output mix, not a measurement of one provider's invoice. Click one lever at a time in the builder below to see what each published factor changes.
Build a price estimate
Click a factor to include it. Watch the estimated price change.
Show sources for each factor
- Activate 18B of 320B parameters: GLM-5.3-Flash has 320B total parameters and 18B active per token (5.6%). A dense 320B model uses ≈640 GFLOP per token, compared with ≈36 for Flash. The same pattern lets GLM-5 use 744B/40B (report §2.1).
- Reduce attention work: The design combines a lightning indexer, top-2,048 sparse attention, and 34 KDA linear layers. Z.ai measured 3.01× less attention compute than GLM-5.3; the GLM-5 report measured DSA at 1.5–2× with ~90% of entries redundant (§2.1.1).
- Use FP8 to move fewer bytes: The native FP8 e4m3 checkpoint is 331 GB versus 640 GB for BF16. Decode is memory-bandwidth-bound, so half the bytes can increase throughput or concurrency. vLLM's FP8 KV pool fits 14.92M tokens versus 8.87M in BF16 (1.68×).
- Accept ~2.7 tokens per forward pass, MTP: Multi-token prediction (MTP): GLM-5 measured a 2.76-token acceptance length versus DeepSeek-V3.2's 2.55 (report Table 2). Flash includes an in-weights draft layer, and vLLM runs it with 5 speculative tokens. This estimate uses 1.6× for verification overhead.
- Lower deployment cost and self-hosting: Report §5 estimates a single Chinese node at about a dual-GPU international cluster, with 50% lower long-sequence deployment cost. The MIT license allows self-hosting, which sets a public lower price bound for APIs. The report says DeepSeek V4 Flash is cheaper.
What does repeated context cost?
An agent is software that asks a model to plan, use tools, and continue a multi-step task. Its shared context can include system instructions, a codebase, and tool results. Later requests often reuse that same prefix. When a large prefix is read from cache hundreds of times, the cache-read price can dominate the total bill even when the input and output rates look small. The worked example in the research receipts uses an agentic coding session with 1 million input tokens, 80% cache hits, and 200,000 output tokens:
Two structural conditions sit outside the waterfall. First, the Massachusetts Institute of Technology (MIT) license lets anyone download the weights and estimate a self-hosted cost. That does not set an API price by itself, because serving also requires hardware, operations, and capacity. It does give customers a visible comparison point instead of a price set only by one provider. Second, DeepSeek V4 Flash lists a lower price than Flash. The published mechanisms explain part of Flash's cost structure, while competition and the cost of serving open weights shape the price a provider can charge.