GLM parameter and protocol differences
Understand GLM parameter differences and usage across compatible protocols.
For GLM models, build the request for your chosen protocol, then apply the adjustments on this page. These are parameter differences explicitly documented by the vendor; see Chat Completions, Responses and Messages for the full request and response structures.
Applicable models
| Model | Applies to |
|---|---|
| GLM-5.3-FlashX, GLM-5.3-Flash | Chat parameter differences and multimodal additions |
| GLM-5.3 | Chat and Responses parameter differences |
GLM-5.3 text parameters
Chat Completions
| Field | Difference |
|---|---|
thinking.type | Thinking is always enabled; only enabled is supported, not disabled |
reasoning_effort | Supports low/high/max; default: max |
temperature | Range: 0~1; default: 1; at most two decimal places |
top_p | Range: 0.01~1; default: 0.95; at most two decimal places. Adjust either this or temperature |
do_sample | GLM extension; default: true. Setting false ignores temperature and top_p |
max_tokens | Range: 1~131072; the output budget includes thinking and the final answer |
tool_stream | GLM extension; to stream function arguments, set this and stream to true |
thinking.clear_thinking | Set false to retain thinking; replay the complete thinking history in its original order |
reasoning_content | Thinking content; streamed through delta.reasoning_content. For interleaved-thinking tool turns, replay it unchanged along with tool_calls from the same message |
request_id | GLM extension; 6–64 characters, optionally a UUID. Generated by the service if omitted |
user_id | GLM extension; 6–128 characters. Use a stable end-user identifier without sensitive information |
tool_choice | GLM-5.3 only supports auto |
response_format.type | GLM-5.3 supports text or json_object |
Responses
This section applies to GLM-5.3.
| Field | Difference |
|---|---|
model, input | Both are required |
temperature | Range: 0~1; default: 1; at most two decimal places |
top_p | Range: 0.01~1; default: 0.95; at most two decimal places |
max_output_tokens | Includes thinking and the answer; default: 65536; maximum: 131072 |
reasoning.effort | Default: max; low/medium maps to high, and xhigh maps to max |
store | Default: false; explicitly set true to save responses or maintain server-side history |
previous_response_id | Continues a saved response; the ID is valid for seven days |
tool_choice | Supports none or auto |
tools[].type | Supports function, namespace, custom and web_search |
text.format.type | Supports text or json_object |
Flash / FlashX multimodal additions
Flash and FlashX share the Chat text parameters above. GLM-5.3 accepts text only and does not use these content blocks.
| Input | Chat content block | Key fields |
|---|---|---|
| Image | type: "image_url" | image_url.url accepts an image URL or Base64 Data URL; use separate content blocks for multiple images |
| Video | type: "video_url" | video_url.url |
| File | type: "file" | Choose one of file.file_id, file.file_url or file.file_data; maximum 50 MB per file. The old file_url content block is retained for compatibility only |
Request examples
Replace MODEL_ID with the full model ID available at your selected protocol endpoint, and use your own API Key.
This text parameter combination works with all three models.
curl 'https://api.agtcloud.ai/v1/chat/completions' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
--data '{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "Explain how to troubleshoot an API timeout in three points"}],
"thinking": {"type": "enabled"},
"reasoning_effort": "low",
"max_tokens": 4096
}'