Z.ai

GLM 5.2

Z.aiToken-based
Alias:glm-5.2
Create API Key

Compare glm-5.2 API pricing, supported endpoints, capabilities and access options on voguesly.

textfunction_callingtoolsjson_modereasoningcontext:1048576
Starting price
Input / Output · 1M
Context
1M
Maximum input window
Max output
131.1K
Maximum tokens per response
Modalities
→

Pricing by Supplier

official
-40%
官方接口直连
Input/ 1M tokens
$0.84$1.4
Output/ 1M tokens
$2.64$4.4
Cache Read/ 1M tokens
$0.156$0.26
Volcengine
-8%
火山引擎官方接口
Input/ 1M tokens
$1.288$1.4
Output/ 1M tokens
$4.048$4.4
Cache Read/ 1M tokens
$0.2392$0.26
Alibaba
阿里巴巴百炼官方
Input/ 1M tokens
$1.4
Output/ 1M tokens
$4.4
Cache Read/ 1M tokens
$0.26
火山引擎特价
-60%
火山引擎官方接口,高并发,活动特价
Input/ 1M tokens
$0.56$1.4
Output/ 1M tokens
$1.76$4.4
Cache Read/ 1M tokens
$0.104$0.26

Capabilities / Supported modalities

StreamingFunction callingToolsJSON modeStructured outputReasoning
Input
Output

Provider & data privacy

Provider
Zhipu AIDocs
Tokenizer
GLM tokenizer
License
GLM-4 LicenseOpen weights
Data retention4 daysNot used for upstream training by default

Performance

Benchmarks

Scores on standardized evaluations. Higher percentages are better — and rank percentile shows

Metrics sourced fromArtificial Analysis 2026-09-30·GLM 5.2

This model is not included in the current benchmark snapshot.

Missing models or measurements are not zero scores.

Benchmark charts preserve the source model selection and reasoning settings. Missing models or measurements are not zero scores, and benchmark cost or speed is not this site’s service commitment.

About GLM 5.2

适合把一项工程任务持续做下去

GLM-5.2 是智谱面向长流程工作的推理模型,接收和输出文本。它适合需要阅读大量项目背景、连续调用工具并反复验证的任务,例如跨模块功能开发、代码迁移、复杂排障和自动化工作流。

项目级开发往往不止是写出一段函数,还要理解已有接口、处理依赖、遵循工程规范并完成验证。可以让 GLM-5.2 先阅读需求与关键代码,整理影响范围,再按步骤实施和检查。长上下文有助于同时保留设计约定、历史讨论和工具结果,减少任务推进时反复补充背景的负担。

它强调编程与工具使用能力,也提供不同的推理投入选择。遇到跨服务故障、相互冲突的需求或复杂算法问题时,可以增加思考深度;明确而局部的改动则应给出清晰范围,避免把简单任务扩展成不必要的重构。在具备文件读取、命令执行等工具的开发助手中,它可以根据实际反馈调整后续步骤。

长流程仍需要明确的完成标准。开始前列出必须满足的行为、兼容条件和检查方法;执行中保留已完成、待验证和受阻事项;交付时要求说明实际修改与验证结果。模型能提出部署或操作方案,是否已经执行成功,应以工具返回和环境中的真实状态判断。

Use cases and prompting

代码迁移提示词

“请将这个项目的数据访问模块迁移到新接口。先阅读旧接口与调用位置,列出行为差异和受影响文件,再按模块完成修改。保留现有错误处理与兼容约定。每一步执行后检查结果,最后汇总已通过的验证和仍需人工决定的问题。”

常见问题

  • 项目材料很多,应该先给什么?先给架构说明、目标模块和接口约定,再按依赖补充代码,减少无关内容干扰。
  • 长任务怎样方便接续?阶段结束时保存目标、约束、修改位置和未完成检查,让下一轮从明确状态继续。
  • 能直接分析界面截图吗?该模型以文本输入为主,界面问题可提供页面结构、报错文本及相关代码。

API access

API documentation

Code samples

RequestPOST/v1/chat/completions
Example request
Parameters
ParameterTypeDefault / rangeDescription
temperature
number
=10 ~ 2
Sampling temperature; lower is more deterministic
top_p
number
=10 ~ 1
Nucleus sampling probability mass
max_tokens
integer>= 1Maximum number of tokens in the response
frequency_penalty
number
=0-2 ~ 2
Penalises repetition of frequent tokens
presence_penalty
number
=0-2 ~ 2
Encourages introducing new topics
stop
array—Up to 4 strings that stop generation
seed
integer—Deterministic sampling seed (best-effort)
n
integer
=1>= 1
Number of completions to generate
stream
boolean
=false
Stream tokens via Server-Sent Events
response_format
object—Force JSON object or schema-conforming output
tools
array—Tool / function declarations the model may call
tool_choice
string
autononerequired
Tool-choice policy or specific tool name
logprobs
boolean
=false
Return per-token log probabilities
top_logprobs
integer0 ~ 20Number of top log probabilities returned per token
logit_bias
object—Per-token logit bias map
user
string—End-user identifier for abuse monitoring

Replace <YOUR_API_KEY> with the API key from your token settings.

Authentication

All requests must include Authorization: Bearer <TOKEN> header. Anthropic-formatted endpoints accept the x-api-key header instead.

Generate tokens from the Tokens page; you can scope them to specific models, groups, IPs, and rate-limits.

Supported parameters

Generation parameters
ParameterTypeDefault / rangeDescription
temperature
number
=10 ~ 2
Sampling temperature; lower is more deterministic
top_p
number
=10 ~ 1
Nucleus sampling probability mass
max_tokens
integer>= 1Maximum number of tokens in the response
frequency_penalty
number
=0-2 ~ 2
Penalises repetition of frequent tokens
presence_penalty
number
=0-2 ~ 2
Encourages introducing new topics
stop
array—Up to 4 strings that stop generation
seed
integer—Deterministic sampling seed (best-effort)
n
integer
=1>= 1
Number of completions to generate
stream
boolean
=false
Stream tokens via Server-Sent Events
response_format
object—Force JSON object or schema-conforming output
tools
array—Tool / function declarations the model may call
tool_choice
string
autononerequired
Tool-choice policy or specific tool name
logprobs
boolean
=false
Return per-token log probabilities
top_logprobs
integer0 ~ 20Number of top log probabilities returned per token
logit_bias
object—Per-token logit bias map
user
string—End-user identifier for abuse monitoring

Rate limits

SupplierRPMTPMRPD
AlibabaUnlimitedUnlimitedUnlimited
officialUnlimitedUnlimitedUnlimited
VolcengineUnlimitedUnlimitedUnlimited
火山引擎特价UnlimitedUnlimitedUnlimited

No restriction

Frequently asked questions about glm-5.2

What is glm-5.2?

Compare glm-5.2 API pricing, supported endpoints, capabilities and access options on voguesly.

How do I call glm-5.2?

Create an API key with access to glm-5.2, then use the exact model ID and a supported endpoint from the API access section. Request fields depend on the selected endpoint.

How is glm-5.2 priced?

Pricing depends on the selected provider group and the model billing unit. The current input, output, request, or media prices are shown on this page before sign-up.

What is the context window of glm-5.2?

The model catalog lists a context window of 1048576 tokens. Check the selected endpoint for request limits.

What is the maximum output of glm-5.2?

The model catalog lists a maximum output of 131072 tokens. Your request settings may set a lower limit.

How should I evaluate glm-5.2 for my project?

Start with the use cases and prompting guidance on this page, then evaluate the model with representative inputs from your project.