Skip to main content
POST
glm-5.2: Chat completions
This model supports the Chat Completions API only. Send requests to /v1/chat/completions — the Responses endpoint (/v1/responses) is not available for this model.
Z.ai’s GLM-5.2 is an open-weight Mixture-of-Experts flagship built for long-horizon tasks, with 753B total parameters activating 8 of 256 experts per token, served on ZeroGPU for general text generation. It sustains a solid 1,048,576-token (1M) context, reasons through a problem with flexible thinking effort before answering, and supports function calling and batch tasks. MIT-licensed with no usage restrictions. When the work spans entire repos, day-long agent sessions, or million-token documents, this is the model.
References: Model docsTermsPrivacy

Authorizations

x-api-key
string
header
required

Headers

x-project-id
string

Optional project identifier. Scopes the request to a specific project when provided.

Body

application/json
model
string
default:glm-5.2
required

Model identifier (fixed for this playground). Use request examples to change use cases.

Allowed value: "glm-5.2"
Example:

"glm-5.2"

messages
object[]
required
Minimum array length: 1
max_tokens
integer

Maximum number of tokens to generate in the response.

Required range: x >= 1
Example:

800

metadata
object

Response

Success

The response is of type object.