AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Vendor parameter differences

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

ModelApplies to
GLM-5.3-FlashX, GLM-5.3-FlashChat parameter differences and multimodal additions
GLM-5.3Chat and Responses parameter differences

GLM-5.3 text parameters

Chat Completions

FieldDifference
thinking.typeThinking is always enabled; only enabled is supported, not disabled
reasoning_effortSupports low/high/max; default: max
temperatureRange: 0~1; default: 1; at most two decimal places
top_pRange: 0.01~1; default: 0.95; at most two decimal places. Adjust either this or temperature
do_sampleGLM extension; default: true. Setting false ignores temperature and top_p
max_tokensRange: 1~131072; the output budget includes thinking and the final answer
tool_streamGLM extension; to stream function arguments, set this and stream to true
thinking.clear_thinkingSet false to retain thinking; replay the complete thinking history in its original order
reasoning_contentThinking content; streamed through delta.reasoning_content. For interleaved-thinking tool turns, replay it unchanged along with tool_calls from the same message
request_idGLM extension; 6–64 characters, optionally a UUID. Generated by the service if omitted
user_idGLM extension; 6–128 characters. Use a stable end-user identifier without sensitive information
tool_choiceGLM-5.3 only supports auto
response_format.typeGLM-5.3 supports text or json_object

Responses

This section applies to GLM-5.3.

FieldDifference
model, inputBoth are required
temperatureRange: 0~1; default: 1; at most two decimal places
top_pRange: 0.01~1; default: 0.95; at most two decimal places
max_output_tokensIncludes thinking and the answer; default: 65536; maximum: 131072
reasoning.effortDefault: max; low/medium maps to high, and xhigh maps to max
storeDefault: false; explicitly set true to save responses or maintain server-side history
previous_response_idContinues a saved response; the ID is valid for seven days
tool_choiceSupports none or auto
tools[].typeSupports function, namespace, custom and web_search
text.format.typeSupports 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.

InputChat content blockKey fields
Imagetype: "image_url"image_url.url accepts an image URL or Base64 Data URL; use separate content blocks for multiple images
Videotype: "video_url"video_url.url
Filetype: "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.cn/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
  }'

Official references

On this page