Z.ai
7 params
Z.ai GLM-5.2 parameters
These are the parameters modelparams.dev tracks for Z.ai GLM-5.2. Each row gives the type, default, valid range or values, and the conditions that gate it. It's the same data the JSON API serves.
Length
1 param
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Max tokens
max_tokens
|
integer (1…131072) | 65536 | Maximum number of tokens to generate in the response. | — |
Sampling
3 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Temperature
temperature
|
number (0…1 step 0.1) | 1 | Controls randomness. Lower values make outputs more focused; higher values make them more varied. |
Not when do_sample = false
|
|
Top P
top_p
|
number (0.01…1 step 0.01) | 0.95 | Controls nucleus sampling by limiting generation to tokens within the selected cumulative probability. |
Not when do_sample = false
|
|
Do sample
do_sample
|
boolean | true | When false, the model uses greedy decoding and ignores temperature and top_p. | — |
Reasoning
2 params
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Thinking mode
thinking.type
|
enum (enabled | disabled) | "enabled" | Toggles the model's extended reasoning before it produces the final answer. | — |
|
Reasoning effort
reasoning_effort
|
enum (none | minimal | low | medium | high | xhigh | max) | "max" | Controls how much reasoning effort GLM-5.2 spends when thinking is enabled. |
Only when thinking.type = "enabled"
|
Output
1 param
| Parameter | Type | Default | Description | Condition |
|---|---|---|---|---|
|
Response format
response_format.type
|
enum (text | json_object) | "text" | Forces the response into plain text or a JSON object. | — |
Z.ai GLM-5.2 API parameters in brief
Z.ai GLM-5.2 documents 7 API parameters, grouped by what they control:
-
Length:
max_tokensdefaults to 65536, range 1–131072. -
Sampling:
temperaturedefaults to 1, range 0–1, not when do_sample = false;top_pdefaults to 0.95, range 0.01–1, not when do_sample = false;do_sampledefaults to true. -
Reasoning:
thinking.typedefaults to "enabled", accepts "enabled", "disabled";reasoning_effortdefaults to "max", accepts "none", "minimal", "low", "medium", "high", "xhigh", …, only when thinking.type = "enabled". -
Output:
response_format.typedefaults to "text", accepts "text", "json_object".
Frequently asked questions
- How many parameters does Z.ai GLM-5.2 accept?
- Z.ai GLM-5.2 accepts 7 API parameters: max_tokens, temperature, top_p, do_sample, thinking.type, reasoning_effort, and more.
- What is the default temperature for Z.ai GLM-5.2?
- The default temperature for Z.ai GLM-5.2 is 1, within a valid range of 0 to 1.
- What is the default top_p for Z.ai GLM-5.2?
- The default top_p for Z.ai GLM-5.2 is 0.95, within a valid range of 0.01 to 1.
- What is the default max_tokens for Z.ai GLM-5.2?
- The default max_tokens for Z.ai GLM-5.2 is 65536, within a valid range of 1 to 131072.
Resources
Other Z.ai models
GLM-4.5
6 params
View
GLM-4.5
Subscription
6 params
View
GLM-4.5-Air
6 params
View
GLM-4.5-Air
Subscription
6 params
View
GLM-4.5-AirX
6 params
View
GLM-4.5-Flash
6 params
View
GLM-4.5-X
6 params
View
GLM-4.6
6 params
View
GLM-4.6
Subscription
6 params
View
GLM-4.7
6 params
View
GLM-4.7
Subscription
6 params
View
GLM-4.7-Flash
6 params
View
GLM-4.7-FlashX
6 params
View
GLM-5
6 params
View
GLM-5
Subscription
6 params
View
GLM-5-Turbo
6 params
View
GLM-5-Turbo
Subscription
6 params
View
GLM-5.1
6 params
View
GLM-5.1
Subscription
6 params
View
GLM-5.2
Subscription
7 params
View