Z.ai: GLM 5.2
GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-level software engineering,...
This model is available through the OpenSIAI OpenAI-compatible API for chat completions and compatible application workflows.
Why It Looks Great
- text->text architecture for Text to Text workloads
- 1048576 context window for long prompts, document analysis, and multi-turn workflows
- Function calling and tool-use support for agentic application workflows
- Structured output support for JSON responses and schema-constrained generation
- Reasoning controls available through supported parameters
Key Features
- Context Window: 1048576 tokens
- Max Input: 104858 tokens
- Max Output: 943718 tokens
- Vision: Not listed
- Function Calling: Supported
- Structured Outputs: Supported
- Image Generation: Not listed
- Audio Input: Not listed
- Supported Parameters: frequency_penalty, include_reasoning, logit_bias, logprobs, max_tokens, min_p, parallel_tool_calls, presence_penalty, reasoning, reasoning_effort, repetition_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_k, top_logprobs, top_p
Specifications
| Specification | Value |
|---|---|
| Provider | chatglm |
| Model Type | Chat Completions model |
| Architecture | text->text |
| Context Window | 1048576 tokens |
| Max Input | 104858 tokens |
| Max Output | 943718 tokens |
| Input | Text |
| Output | Text |
| Vision | Not listed |
| Function Calling | Supported |
| Structured Outputs | Supported |
| Release Date | June 17, 2026 |
How to Use
- Write your prompt - describe the task, provide context, and specify the desired output format.
- Submit - the model processes your request and returns the response.
API Integration
Base URL: https://llm.opensi.com.ai/v1 API Endpoint: chat/completions Model ID: z-ai/glm-5.2
API Usage
Python SDK
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://llm.opensi.com.ai/v1"
)
response = client.chat.completions.create(
model="z-ai/glm-5.2",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)cURL
curl https://llm.opensi.com.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "z-ai/glm-5.2",
"messages": [{"role": "user", "content": "Hello!"}]
}'Notes
- Model: z-ai/glm-5.2
- Provider: chatglm