GLM 5.2
Z.ai's flagship open-weights MoE with 1M context, reasoning, and tool use for long-horizon coding.
Get API key- Provider
- Z.ai (Zhipu AI)
- Price
- $1.40 in · $4.40 out / 1M
- Context window
- 1M tokens
- Released
- June 1, 2026
- License
- MIT
What is GLM 5.2?
GLM 5.2 is Z.ai's flagship open-weights language model released in June 2026. It is a Mixture-of-Experts model with a 1M-token context window, built for long-horizon coding and agentic tasks. It supports reasoning, tool use, web search, and structured output, and tops open-source benchmarks like SWE-bench Pro.
Use it privately on Venice
On Venice, GLM 5.2 runs under a private, zero-retention tier — your prompts are not stored or used for training. You get its full 1M context, reasoning modes, tool use, and code-optimized capabilities on a permissionless stack, with open weights you can inspect and self-host if you choose.
What can it do?
- •Open weights under MIT license — fully auditable, self-hostable, and free of regional restrictions.
- •Solid 1M-token context reliably sustains long-horizon engineering and codebase-scale tasks without fragmentation.
- •Frontier coding performance — leads open models on SWE-bench Pro (62.1) and Terminal-Bench 2.1 (81.0).
- •Selectable reasoning modes (High / Max thinking effort) let you trade latency for depth on complex problems.
- •Native tool use, web search, and structured JSON output make it a strong substrate for agentic and MCP workflows.
- •Private, zero-retention inference on Venice with no subscription lock-in.
- •Not uncensored — carries standard alignment and refusal patterns.
- •Self-hosting requires massive GPU infrastructure due to its large MoE architecture.
- •Runs at fp8 quantization on Venice, which may slightly reduce precision versus self-hosted BF16.
- •Closed-weight rivals like Claude Opus 4.8 still win on the hardest reasoning benchmarks and some repo-level fixes.
- •1M context power comes with higher latency and cost for very long inputs compared to smaller-context models.
GLM 5.2 capabilities
- Tool use / function calling
- Vision (image input)
- Reasoning
- Web search
- Code-optimized
- Structured output (JSON schema)
- Audio input
- Video input
- Multiple image inputs
- Log probabilities
How to use it via API
Venice exposes an OpenAI-compatible API. Swap your base URL and call zai-org-glm-5-2.
curl https://api.venice.ai/api/v1/chat/completions \
-H "Authorization: Bearer $VENICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org-glm-5-2",
"messages": [{ "role": "user", "content": "Explain quantum tunneling simply." }]
}'Specifications
Pricing
Billed per token on Venice: $1.40 per 1M input tokens and $4.40 per 1M output tokens.
New Venice accounts include a free daily allowance and 500 welcome credits — no credit card required.
GLM 5.2 vs alternatives
| Model | Context window | Open weights | Price (Venice) | Best for |
|---|---|---|---|---|
| GLM 5.2 | 1M tokens | Yes | $1.40 in · $4.40 out / 1M | Long-horizon coding & agentic tasks |
| Claude Opus 4.8 | 1M tokens | No | $6 in · $30 out / 1M | Hardest closed-frontier reasoning |
| DeepSeek V3.2 | 160K tokens | Yes | $0.33 in · $0.48 out / 1M | Efficiency & lightweight open deployments |
| Kimi K2.6 | 256K tokens | Yes | $0.75 in · $3.50 out / 1M | Agentic workflows & long documents |
The open-weights leader with 1M context and frontier coding scores at a fraction of closed-model pricing.
What is it good for?
- •Project-level codebase takeover: ingest entire repositories and maintain architectural context across long sessions.
- •Agentic engineering workflows: multi-step implementation, debugging, testing, and deployment.
- •Automated research and performance optimization across large document sets.
- •Complex tool chains and MCP integrations requiring function calling and structured output.
- •Long-form structured data extraction and JSON schema generation from massive inputs.
Prompting tips
- •Select Max thinking effort for complex, multi-step coding or deep reasoning tasks.
- •Feed the model full project directories, API contracts, and directory structures to exploit the 1M context.
- •Use function calling and web search in iterative loops rather than single-shot prompts for agentic tasks.
- •Leverage structured JSON schema output to integrate results directly into downstream systems.
- •For long conversations, the model’s intelligent caching optimizes token usage — keep context within the same thread.
Version history
CurrentCurrent flagship with 1M context, IndexShare architecture, and MIT license.
Frequently asked questions
GLM 5.2 is Z.ai's flagship open-weights language model released in June 2026. It is a Mixture-of-Experts model with a 1M-token context, built for long-horizon coding and agentic tasks, supporting reasoning, tool use, web search, and structured output.
Venice bills GLM 5.2 at $1.40 per 1M input tokens and $4.40 per 1M output tokens, with cached input at $0.26 per 1M. There is no subscription; you pay per token with credits.
Yes. GLM 5.2 is released under the MIT license with open weights, so you can download, self-host, and fine-tune it. On Venice it runs privately without storing your prompts.
Yes. GLM 5.2 supports function calling, tool use, web search, and structured JSON output, making it suitable for agentic workflows and MCP integrations.
It runs under Venice's private, zero-retention tier. Your prompts are not stored, profiled, or used for training, and the session carries no persistent personal history.
GLM 5.2 is the open-weights leader with a 1M context and strong coding benchmarks at a fraction of the price. Claude Opus 4.8 still leads on the hardest reasoning tasks and repo-level fixes, but costs significantly more. Route everyday and mid-tier coding to GLM 5.2 and escalate to Claude only when needed.
GLM 5.2 supports up to 1,000K (1M) input tokens and can generate up to 131,072 output tokens in a single request.
Yes. GLM 5.2 offers selectable thinking effort levels (High and Max) that let you trade speed for deeper reasoning on complex coding and math problems.
Yes. Because the weights are open under the MIT license, you can self-host the model. However, its large MoE architecture requires substantial GPU resources, so many users prefer the hosted, private inference on Venice.
Related models
Run GLM 5.2 privately.
No prompt logging. No data used for training. Free to start — no credit card.
