Zhipu AIOpen-weight·1049K context· params·MIT

GLM-5.2zhipu/glm-5-2

GLM-5.2 is Zhipu AI's coding-focused flagship, released 2026-06-17 with a 1M-token context window and open weights under a plain MIT license — no regional restrictions. At 753B parameters it targets long-horizon agentic coding, and it is the most-downloaded model in this directory by a wide margin. Native API pricing is $1.40 per 1M input tokens and $4.40 per 1M output, with cached input at $0.26.

Cheapest blended:$2.15 / 1M tokenson Zhipu AI · 1 provider listed

Pricing across providers

Sort by:
ProviderInput /1MOutput /1MBlended /1MLatency p50FormatFreshnessAction
Zhipu AI
glm-5.2
$1.40$4.40$2.15OpenAI-compatiblePrice 1mo agoTry →

Affiliate disclosure: We may earn a commission from qualified signups. Pricing independence is enforced at the data layer — see our Editorial Independence Policy.

Works with

Point any of these clients at a hosting's base URL — they all speak at least one of this model's endpoint protocols (OPENAI_COMPATIBLE).

Capabilities

  • chat
  • code
  • reasoning
  • long_context
  • agent

Code samples

Example using Zhipu AI — the cheapest hosting for this model as of last verification. Swap base_url and model to use a different provider from the matrix above.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.z.ai/api/paas/v4",
)

response = client.chat.completions.create(
    model="glm-5.2",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Technical specs

Context
1049K
Max output
Parameters
Release
Training cutoff
License
MIT

Similar models

Compare with

  • GLM-5.2 vs DeepSeek V3.1
    Comparison planned — not yet published
  • GLM-5.2 vs R1
    Comparison planned — not yet published
  • GLM-5.2 vs DeepSeek V3
    Comparison planned — not yet published

Frequently asked

How much does GLM-5.2 cost?+
The cheapest public hosting is $2.15 per 1M blended tokens on Zhipu AI. 1 total providers are listed above with per-input / per-output / cached pricing.
How do I access GLM-5.2 from outside China?+
All hostings listed above support global access. The official API (e.g. api.deepseek.com, dashscope-intl.aliyuncs.com) accepts international credit cards and does not require a Chinese mobile number. For privacy-sensitive workloads, third-party aggregators like Together.ai host the model on US/EU infrastructure.
Is GLM-5.2 open-source? Can I fine-tune it?+
Yes. GLM-5.2 is open-weight under the MIT license. Weights are available on Hugging Face for local inference, fine-tuning, and commercial use (see license for specific terms).
Is GLM-5.2 OpenAI-compatible?+
Most listed hostings expose an OpenAI-compatible API, so you can point an existing openai SDK client at the Provider's base_url and use the Provider's model name. See the Code Samples above for a copy-pasteable example.
What's the maximum context window for GLM-5.2?+
The model supports up to 1,048,576 tokens of context (input + output). Some hosted versions may impose a smaller limit — check the "Context" column in the pricing matrix for each provider.