⌘K

GLM-5.3

glm-5.3

GLM-5.3 is Z.AI's latest flagship model for complex software engineering and agent tasks. It accepts text input only, supports a 1M-token context window and up to 131,072 output tokens, and always enables thinking through an OpenAI Chat Completions-compatible API.

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 accepts text input only, with a 1M-token context window and a maximum output of 131,072 tokens. 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


messages array required

Conversation history.

role string required

One of user, assistant, system, or tool.

content string | array required

A text string or an OpenAI-compatible content array containing text items only.


thinking object

GLM-5.3 always enables thinking. thinking.type must be enabled; disabling thinking is not supported.

type string

enabled.


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].


tools array

Tools available to the model, using the OpenAI function tool structure.

type string required

function.

function object required

Function 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 integer

Choice index.

message object

Assistant message.

role string

Always assistant.

content string | null

Final answer text.

reasoning_content string (optional)

Reasoning text produced by GLM-5.3’s always-on thinking.

finish_reason string

Completion reason, such as stop, length, or tool_calls.


usage object

Token usage for the request.

prompt_tokens integer

Input tokens.

completion_tokens integer

Output tokens.

total_tokens integer

Sum of input and output tokens.

completion_tokens_details.reasoning_tokens integer (optional)

Tokens consumed by thinking.