Authentication
authorization string required
All APIs require authentication via Bearer Token.
Get API Key:
Visit API Key Management Page to get your API Key.
Usage:
Add to request header:
Authorization: Bearer YOUR_API_KEY
Endpoint and compatibility
POST https://cloud.vtrix.ai/llm/chat/completions
This endpoint uses the OpenAI Chat Completions format: the top level contains choices and usage. It is not an asynchronous task API, so the response does not contain status, output, asset url, jobId, cost, or discount fields.
Model capabilities
GLM-5.3-Flash is a native multimodal model that accepts video, image, text, and file inputs, with a 1M-token context window and a maximum output of 131,072 tokens. For multimodal requests, use content blocks such as image_url, video_url, and file. Thinking is always enabled: thinking.type must be enabled, and reasoning_effort supports low, high, and max (default: max).
Parameters
model string required
Model ID for the request.
Value: glm-5.3-flash
messages array required
Conversation history.
role
stringrequiredOne of
user,assistant,system, ortool.
content
string | arrayrequiredA text string or an OpenAI-compatible content array containing text, image, video, or file items. Use
image_url,video_url, orfilecontent blocks for multimodal inputs.
thinking object
GLM-5.3-Flash always enables thinking. thinking.type must be enabled; disabling thinking is not supported. For preserved thinking across turns, set clear_thinking to false.
type
string
enabled.
clear_thinking
booleanWhether to preserve reasoning content from previous turns.
Default:
true. Set tofalseto preserve thinking blocks across turns.
reasoning_effort string
Reasoning effort for always-on thinking. Default: max.
Options: low, high, max.
max_tokens integer
Maximum completion token budget, from 1 to 131072. Thinking tokens consume this budget, so reserve sufficient tokens when thinking is enabled.
temperature number
Sampling temperature. Default: 1.0; range: 0.0 to 1.0.
top_p number
Nucleus sampling parameter. Default: 0.95; range: 0.01 to 1.0.
stream boolean
Streams Server-Sent Events (SSE) when true; default: false. Stream chunks use the OpenAI Chat Completions chunk format and end with data: [DONE].
tool_stream boolean
Whether to stream function-call arguments incrementally.
Default: false.
tools array
Tools available to the model, using the OpenAI function tool structure.
type
stringrequired
function.
function
objectrequiredFunction definition.
tool_choice string | object
Tool selection strategy: auto, none, required, or an explicit function selection.
stop string | array
One or more stop sequences; up to four strings.
response_format object
Output-format constraint. Its type may be text or json_object.
Response format
id string
Chat Completion request ID.
object string
Always chat.completion.
created integer
Unix timestamp in seconds for response creation.
model string
Model ID that processed the request.
choices array
One or more completion choices.
index
integerChoice index.
message
objectAssistant message.
role
stringAlways
assistant.content
string | nullFinal answer text.
reasoning_content
string(optional)Reasoning text produced by GLM-5.3-Flash’s always-on thinking.
finish_reason
stringCompletion reason, such as
stop,length, ortool_calls.
usage object
Token usage for the request.
prompt_tokens
integerInput tokens.
completion_tokens
integerOutput tokens.
total_tokens
integerSum of input and output tokens.
completion_tokens_details.reasoning_tokens
integer(optional)Tokens consumed by thinking.