GLM 5.2
Z.AI logo

GLM 5.2

glm-5.2
Z.AI
GLM-5.2 is Z.ai’s flagship model for the era of long-horizon tasks. With a truly usable 1M-token context window, it can handle project-level engineering context, execute long-running tasks more reliably, follow engineering standards more consistently, and complete the full development workflow from requirements to multi-platform deployment in a single task.

Pricing

  • Input Tokens: $1.127 /M tokens
  • Output Tokens: $3.944 /M tokens
  • Cache Read: $0.282 /M tokens

Input Modalities

  • Text

Output Modalities

  • Text

Context length

  • 1M tokens

Max output

  • 131K tokens

Capabilities

  • Thinking
  • Streaming
  • Tool calling
  • Web search
  • URL context
  • Code interpreter
  • Computer use
  • File search
  • Memory tool
  • Structured outputs
  • Citations
  • Prompt caching
  • Background mode
  • Server-side sessions

Providers

Baidu baidu-glm-5.2
50% off·14:00–23:59 UTC
Pricing$1.127$0.563$3.944$1.972
Cache$0.282$0.141
Context1M
Max output128K
Latency11.9S
Throughput30.0TPS
Uptime
100.00% uptime 2 days ago
99.85% uptime yesterday
100.00% uptime today
Alibaba Cloud alicloud-glm-5.2
30% off·00:00–23:59 UTC
Pricing$1.127$0.789$3.944$2.761
Cache$0.282$0.197
Context1M
Max output128K
Latency4.0S
Throughput42.5TPS
Uptime
100.00% uptime 2 days ago
100.00% uptime yesterday
100.00% uptime today
Z.AI zai-glm-5.2
Pricing$1.127$3.944
Cache$0.282
Context1M
Max output128K
Latency2.1S
Throughput8.8TPS
Uptime
100.00% uptime 2 days ago
100.00% uptime yesterday
100.00% uptime today
Tencent tencent-glm-5.2
Pricing$1.238$4.333
Cache$0.309
Context1M
Max output128K
Latency1.8S
Throughput8.1TPS
Uptime
100.00% uptime 2 days ago
100.00% uptime yesterday
100.00% uptime today
Deepinfra deepinfra-glm-5.2
Pricing$1.045$3.300
Cache$0.198
Context1M
Max output128K
Latency0.8S
Throughput36.0TPS
Uptime
100.00% uptime 2 days ago
100.00% uptime yesterday
100.00% uptime today

Performance for glm-5.2

Uptime is the percentage of requests that succeeded over the past 72 hours. AIHubMix continuously monitors every provider and automatically retries with the next-best provider when one returns an error or responds too slowly; Latency is total round-trip time (lower is better); Throughput is how fast the model writes (tokens per second, higher is better).

Uptime
Loading...
Latency
Loading...
Throughput
Loading...

Try this model

Python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AIHUBMIX_API_KEY"],
    base_url="https://aihubmix.com/v1",
)

response = client.chat.completions.create(
    model="glm-5.2",
    messages=[
      {
        "role": "user",
        "content": "Hello, how are you?"
      }
    ],
    max_tokens=1024,
    stream=False,
)

print(response.choices[0].message.content)

Frequently asked questions

What is GLM 5.2?

GLM-5.2 is Z.ai’s flagship model for the era of long-horizon tasks. With a truly usable 1M-token context window, it can handle project-level engineering context, execute long-running tasks more reliably, follow engineering standards more consistently, and complete the full development workflow from requirements to multi-platform deployment in a single task.