GLM 5.2

Zhipu Ai chatreasoningtool_use Long

API ID: z-ai/glm-5.2-20260616

Input Price
$1.40
/1M tokens
Output Price
$4.40
/1M tokens
Cached Input
$0.14
Save 90%

About GLM 5.2

GLM 5.2 is a mid-range general-purpose model from Zhipu Ai with ultra-long context (1.0M), suitable for conversations, content creation, and general AI tasks.

๐Ÿ’ฐ
Price Ranking
#1076 lowest price among 1240 Chat models

Model Specifications

Context Length
1.0M
Max Output
262k
Release Date
2026-06-16
Capabilities
chat reasoning tool_use
Input Modalities
text
Output Modalities
text

Best For

  • Complex reasoning, math problems, multi-step logic
  • Conversations, content writing, general assistance

Consider Alternatives For

  • Image understanding (needs vision capability)
  • Simple Q&A (cheaper models available)

๐Ÿ’ฐ Real-World Cost Examples

Estimated monthly costs for common use cases

Personal AI Assistant
$1.95
/month
50 conversations/day, ~500 tokens each
Customer Service Bot
$60.60
/month
1000 tickets/day, ~800 tokens each
Data Analysis Pipeline
$84.30
/month
500 analyses/day, ~2k tokens each

Zhipu Ai Model Lineup

Compare all models from Zhipu Ai to find the best fit

Model Input Output Context Capabilities
GLM 5.2 Current Free Free 1.0M chat reasoning tool_use
GLM 4 9B Free Free 32k chat
GLM 4 9B Free Free 32k chat
GLM 4 32B Free Free 33k chat
GLM 4 32B Free Free 33k chat
GLM 4.1V 9B Thinking Free Free 66k chat vision reasoning

Similar Models from Other Providers

Cross-brand alternatives with similar capabilities

Alibaba Qwen Qwen3.7 Max
Input: $1.48
Output: $4.42
Context: 1.0M
OpenAI GPT-5.1 (batch)
Input: $0.63
Output: $5.00
Context: 400k
OpenAI GPT-5 Codex (batch)
Input: $0.63
Output: $5.00
Context: 400k
OpenAI GPT-5 (batch)
Input: $0.63
Output: $5.00
Context: 400k

๐Ÿš€ Quick Start

Get started with GLM 5.2 API

OpenAI-compatible SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.provider.com/v1",
    api_key="YOUR_API_KEY"
)

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