GLM-5.2 Air API
128K context · Released Jul 8, 2026 · By Z.ai · MIT
GLM-5.2 Air costs $0.17 per million input tokens and $0.62 per million output tokens, against an official rate of $0.28 and $1.10 — 43% below official pricing. It is a Z.ai model under the MIT licence, with a 128K context window, callable through an OpenAI-compatible endpoint with the model id z-ai/glm-5.2-air. On an agent or chat workload that resends a fixed prompt prefix, where that prefix is billed at the cached rate of $0.034 per million, the saving reaches 67%. This model is listed for reference and is not currently served by an upstream provider, so requests for it return no available channel.
Not currently available. No configured upstream serves this model, so a request for it returns no available channel. The rate below is what it will cost when it is enabled.
Input
$0.17/M
$0.28/M
Output
$0.62/M
$1.10/M
Savings
43%
off official
- No markup
- OpenAI SDK compatible
- No minimum spend
- MIT
GLM-5.2 distilled for latency and cost. The right default for high-volume classification, extraction and routing steps inside a larger pipeline.
Copy this and go
The model id is already filled in. Nothing in this snippet needs editing except your key.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://router.xark.io/api/v1" # ← the only line that changes
)
response = client.chat.completions.create(
model="z-ai/glm-5.2-air",
messages=[{"role": "user", "content": "Hello"}]
)
GLM-5.2 Air pricing across providers
Rates as published by each provider. We update these when they change; if you spot one that's stale, tell us and we'll fix it.
| Provider | Input | Output |
|---|---|---|
| AI Token Router | $0.17/M | $0.62/M |
| Official (Z.ai) | $0.28/M | $1.10/M |
| OpenRouter | $0.27/M | $1.07/M |
| DeepInfra | $0.20/M | $0.75/M |
| Together AI | $0.26/M | $1.00/M |
Cached input on GLM-5.2 Air is billed at $0.034/M — roughly 80% below the standard input rate. For agent loops with a large fixed system prompt this is usually the number that matters most.
What it's good at
- High-throughput classification and extraction
- Cheap router/planner step in front of a larger model
- Real-time chat where latency beats depth
Other text models
GLM-5.2 Air questions
Every figure below is read from the same catalogue entry as the table above, so the two cannot disagree.
What does GLM-5.2 Air cost on AI Token Router, and what is the official rate?
Input is $0.17/M here against $0.28/M official, and output is $0.62/M against $1.10/M official — $0.11/M off every million input tokens and $0.48/M off every million output tokens. The headline 43% blends the two, weighted three to one towards output, because real workloads write far more than they read and a flat average of the two percentages would overstate what you actually save. Both figures are printed side by side on this page: the official rate is the only benchmark that makes ours mean anything.
Can I call GLM-5.2 Air right now?
No. GLM-5.2 Air is catalogued but not currently servable — no configured upstream provider carries it, so a request naming z-ai/glm-5.2-air returns no available channel instead of a result. The rate on this page is what it will cost once an upstream serves it, not something you can spend today. The text models you can call today are Kimi K2.6, Kimi K3, GLM-5.2, DeepSeek V4 Pro and DeepSeek V4 Flash. 7 of the 24 catalogued models are callable, and every page says which it is.
Does GLM-5.2 Air support prompt caching, and what does a cached token cost?
Yes. A repeated prefix — a fixed system prompt, a tool schema, a document you keep querying — is served from the model's KV cache and billed at $0.034/M instead of the standard $0.17/M, which is 80% below the input rate. Z.ai's own cached rate is $0.056/M, so the discount applies on top of a rate that is already below official. Nothing has to be set on the request; the prefix is matched automatically. On an agent loop, where most of every request is unchanged from the last one, this is usually the largest single line on the bill.
How do I call GLM-5.2 Air from my code?
Point an OpenAI SDK at https://router.xark.io/api/v1 and pass model="z-ai/glm-5.2-air" — the chat completions endpoint is https://router.xark.io/api/v1/chat/completions. Request shape, streaming frames, the usage block and the error envelope all match what your OpenAI client already handles, so the base URL and the model id are the only two lines that change. The bare name glm-5.2-air and the URL slug glm-5-2-air resolve to the same model. An integration written before the ids were namespaced therefore keeps working.
How large is GLM-5.2 Air's context window?
128K — 131,072 tokens in a single request, shared between everything you send and everything the model generates back. For comparison, the widest context in this catalogue is Llama 4 Maverick at 1M. Context is billed like any other input: filling the window costs the input rate on every token in it, every turn, which is why the cached-input rate matters more than the window size on a workload that resends the same prefix.
What licence is GLM-5.2 Air under, and can I use it commercially?
GLM-5.2 Air is published by Z.ai under the MIT licence. MIT is a standard permissive licence: commercial use, modification and redistribution are all allowed, and the only obligation is to keep the copyright and licence notice with the software. It sets no user threshold, no field-of-use restriction and no separate acceptable-use policy, so there is nothing in it that limits what you build commercially on top of the output.
How does GLM-5.2 Air pricing here compare with other providers carrying it?
Of the 3 other providers we track carrying GLM-5.2 Air, the lowest is DeepInfra at $0.20/M input and $0.75/M output, against our $0.17/M input and $0.62/M output. That is where the rates stood when we last reconciled them, and it can change without notice — we are not claiming to be the cheapest source for this model, only that our rate sits below Z.ai's official $0.28/M. If you find one of these figures stale, tell us and we will correct it.
What is GLM-5.2 Air actually good at?
GLM-5.2 distilled for latency and cost. The right default for high-volume classification, extraction and routing steps inside a larger pipeline. In practice that points at high-throughput classification and extraction, cheap router/planner step in front of a larger model and real-time chat where latency beats depth. The specifics that actually decide a fit — the rate, the licence and what it will and will not serve today — are all on this page rather than behind a sales conversation.