- Model ID
- glm-5.2
- Context
- 1M
- Provider
- Z.ai
- Input · USD / 1M tokens
- $0.7 USD
- Official price $1.4 USD
- Output · USD / 1M tokens
- $2.2 USD
- Official price $4.4 USD
- Savings
- 50%
- Last verified
- 2026-08-09
01
What this model is for
GLM-5.2 is Z.ai's flagship text model for long-horizon tasks. Its official model reference lists a 1-million-token context window, up to 128,000 output tokens, thinking modes, streaming, function calling, structured output, MCP integration, and context caching. These are provider capabilities; the exact controls exposed still depend on the client and API route.
On OmniaKey, call the exact model ID glm-5.2 through the OpenAI-compatible /v1/chat/completions endpoint. As of August 9, 2026, the current catalog charges $0.70 per 1M uncached input tokens and $2.20 per 1M output tokens, half of Z.ai's $1.40 and $4.40 list rates. Treat the 1M window as metered capacity, not a free allowance, and validate cost and acceptance rate on representative work.
Best-fit coding workloads
Project-scale repository analysis
Keep architecture, API contracts, tests, documentation, and engineering rules in scope while planning a bounded change.
Long-horizon implementation
Carry a multi-file task from dependency analysis through edits and verification without dropping earlier constraints.
Structured agent workflows
Combine function calls, machine-readable output, streaming, and reusable context in automation with explicit permissions and acceptance checks.
02
Technical specification
Catalog facts and integration details verified for this route.
- Model ID
- glm-5.2
- Context
- 1M
- Inputs and tools
- Tool use
- API endpoint
- /v1/chat/completions
- Cache hit / 1M
- $0.13 USD
- Coding clients
- Claude Code · Codex · Cursor · Cline · Aider
Limits to plan around
- Z.ai's model card lists GLM-5.2 as text input and text output; use a model explicitly marked for vision when the task requires images.
- A 1M context limit does not make an unfiltered repository useful or cheap. Retrieval quality, client limits, cache eligibility, and output volume still affect results and cost.
- Z.ai's benchmark and product claims are not independently reproduced here. Test correctness, tool-call reliability, latency, retries, and cost on the same accepted task before standardizing.
03
Compare nearby models
Compare workload fit and current listed token rates before choosing a route.
| Model | Best for | Context | Input | Output |
|---|---|---|---|---|
| GLM-5.2This page glm-5.2 | Text-first, long-horizon agent work with 1M context, a 128K output ceiling, and current OmniaKey pricing at 50% of Z.ai list rates. | 1M | $0.7 USD Official price $1.4 USD | $2.2 USD Official price $4.4 USD |
| DeepSeek V4 Pro deepseek-v4-pro | Another text and tool-use route with 1M context and lower listed token rates; compare accepted-task quality, retries, and cache behavior. | 1M | $0.435 USD Official price $0.435 USD | $0.87 USD Official price $0.87 USD |
| Gemini 3.1 Pro Preview gemini-3.1-pro-preview | A 1M-context preview route that also accepts vision input; choose it when multimodal input matters and a preview lifecycle is acceptable. | 1M | $1.6 USD Official price $2 USD | $9.6 USD Official price $12 USD |
04
SDK quickstarts
Use one base URL and model ID from cURL, Python, or TypeScript.
curl https://api.omniakey.com/v1/chat/completions \
-H "Authorization: Bearer $OMNIAKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [
{"role": "user", "content": "Review this pull request"}
],
"stream": true
}'05
Estimate token cost
Enter expected input and output tokens to compare current listed rates.
- OmniaKey estimate
- $0.114
- Official-rate estimate
- $0.228
- Estimated savings
- $0.114
Estimate covers input and output tokens only. Cache usage, retries, tools, and client-side token accounting can change the final charge.
06
Related coding guides
Deeper selection, setup, and troubleshooting guidance for this model family.
GLM-5.3 vs GLM-5.2 for Coding
GLM-5.3 keeps the GLM-5.2 base model but changes the coding decision through stronger post-training, new effort controls, and a breaking thinking-mode migration.
Read guideGLM-5.2 API Pricing
Z.ai lists GLM-5.2 at $1.40 input, $0.26 cached input, and $4.40 output per million tokens. OmniaKey currently charges 50% of those rates.
Read guideBest LLM for Coding Agents in 2026: Claude vs GPT vs Gemini
There's no single best coding model — Claude, GPT, and Gemini each win a different axis. How they compare on tool use, context, and cost, and why routing beats picking just one.
Read guide07
Sources and verification
Model facts and links were checked on 2026-08-09. Provider documentation remains the authority for upstream behavior.
Frequently asked questions
How much does GLM-5.2 cost on OmniaKey?
OmniaKey charges $0.7 USD per 1M input tokens and $2.2 USD per 1M output tokens, in USD. Official prices are $1.4 USD and $4.4 USD; you save 50%.
What is the context window for GLM-5.2?
The listed context window is 1M. Actual usable limits can also depend on the client and upstream request format.
What model ID and endpoint should I use for GLM-5.2?
Use the exact model ID glm-5.2 and send an OpenAI-compatible request to https://api.omniakey.com/v1/chat/completions with Bearer API-key authentication. Do not substitute the page title or provider display name for the model ID.
Does GLM-5.2 accept images or other multimodal input?
Z.ai's current GLM-5.2 model card lists both input and output as text. Do not mistake the general Chat Completions API's multimodal formats for GLM-5.2 vision support; choose a catalog model explicitly marked for vision when images are required.
Which GLM-5.2 features should I verify before production?
Replay representative requests for thinking controls, streaming, function calls, structured output, and cache accounting in the exact SDK and agent version you will deploy. Also verify cancellation, retries, usage records, and acceptance tests before raising a key limit.