GLM (Z.ai)
GLM-5.2: 1M context and agents; GLM-4.7-Flash for lighter self-hosting
GLM is a model family from Z.ai, formerly known as Zhipu AI. Its flagship GLM-5.2 is a text model designed for long-running engineering and agentic work: it supports a 1M-token context, up to 128K output tokens, reasoning modes, function calling, context caching, structured output and MCP tools. It is available through an API compatible with the OpenAI client and as public weights under the MIT license. At roughly 753B parameters, running the full model requires data-center-class infrastructure. GLM-4.7-Flash is the more practical local option: a 30B-A3B MoE model with 200K context, also under MIT.
Verified: 2026-06-23
Purchase decision (when to choose / when to avoid)
Choose if...
- You need long context for multi-step software-engineering work.
- You are building agents with function calling, structured output or MCP tools.
- You can benchmark a low-cost API against an open-weight deployment.
Avoid if...
- You expect to run full GLM-5.2 on modest hardware; roughly 753B parameters require data-center resources.
- Excellent Polish is required without additional evaluation; official materials focus on English and Chinese.
- You need turnkey governance, data residency and regulated-sector contracts without further vendor review.
Cost in practice (scenarios)
$1.40 input / $0.26 cached input / $4.40 output per 1M tokens in the June 23, 2026 price list.
- web search and other tools billed separately
- prices may change
GPU and operating cost; the 30B-A3B variant is much more practical than full GLM-5.2.
- vLLM or SGLang
- monitoring, updates and guardrails managed by the deployer
Data-center-class infrastructure; do not treat public weights as a typical local-server option.
- roughly 753B parameters
- multi-GPU cluster and MLOps expertise
Deployment / data / enterprise
Deployment channels
- Z.ai API through the official SDK or an OpenAI-compatible client
- Self-host GLM-4.7-Flash with vLLM, SGLang or compatible tools
- Self-host GLM-5.2 only with infrastructure appropriate for a roughly 753B model
Data policy
- Training on data
- For self-hosting, controlled by the deployer; for the API, verify the current Z.ai service terms.
- Retention
- Depends on channel and contract; a public model card does not replace API service terms.
- Data residency
- Depends on self-hosting location or regions offered by the API service.
Enterprise readiness
- Admin
- The API provides keys, billing and official SDKs; broader organizational controls must be confirmed.
- SSO/SCIM
- Confirm with Z.ai for the selected plan.
- Audit
- Application logging and request auditing should be designed by the deployer.
- DPA
- Confirm before processing personal data.
- Certifications
- Check current documentation from Z.ai and the hosting provider.