New Flagship Model Added: GLM-5.3
Date: 2026-08-18 / (1405-05-27)
Summary
Z.AI's new flagship model, glm-5.3, is now available through AvalAI for complex coding, long-horizon agent tasks, and security analysis. It supports v1/chat/completions and v1/messages, with partial support for v1/responses.
Details
Z.AI GLM-5.3
glm-5.3 uses the same base model as GLM-5.2 and improves its coding, agentic, and cyber-security capabilities through additional post-training. It is designed for substantial engineering tasks that require planning, implementation, testing, tool use, and verification across long-running sessions.
Key Features:
- Stronger Coding: Z.AI reports a 50% improvement over GLM-5.2 on its internal Z.ai Code Bench
- Long-Horizon Agents: Improved performance on multi-step engineering and research workflows
- Cyber-Security Analysis: Stronger vulnerability discovery and exploitation-chain reasoning; use only in authorized environments
- Large Context: Up to 1,000,000 input tokens and 128,000 output tokens
- Mandatory Thinking: Thinking cannot be disabled;
reasoning_effortacceptslow,high, ormax - Developer Capabilities: Function calling, structured outputs, streaming, and context caching
- Best For: Agentic coding, repository-scale engineering, long-running automation, and authorized security research
Benchmark Highlights Reported by Z.AI
| Evaluation | GLM-5.3 | GLM-5.2 |
|---|---|---|
| Terminal-Bench 3.0 | 28.3 | 4.6 |
| DeepSWE v1.1 | 66.9 | 46.2 |
| Agents' Last Exam | 28.5 | 23.8 |
| CyberGym | 84.5 | 77.2 |
| ExploitBench | 54.4 | 24.4 |
Benchmark results are directional evidence. Evaluate the model with representative repositories, tools, security controls, and acceptance criteria before routing production traffic.
Endpoint Availability
| Endpoint | Support | Notes |
|---|---|---|
v1/chat/completions | Supported | OpenAI-compatible Chat Completions |
v1/messages | Supported | Anthropic-compatible Messages API |
v1/responses | Partial support | Verify required parameters and tools before production use |
Pricing
Prices are in USD per 1 million tokens.
| Input | Cached Input | Output |
|---|---|---|
| $1.40 | $0.26 | $4.40 |
See the pricing page for current rates and account-tier limits.
Thinking Configuration and Migration
GLM-5.3 always uses thinking. The default reasoning_effort is max; max is recommended for difficult coding tasks, while low can reduce reasoning depth for simpler requests.
{
"model": "glm-5.3",
"thinking": {
"type": "enabled"
},
"reasoning_effort": "max"
}If an existing GLM request sends thinking.type: "disabled", change it to enabled before switching the model ID to glm-5.3; otherwise, the request fails. Applications that want the lightest available thinking should set reasoning_effort to low.
API Request and Response Example
Request
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "glm-5.3",
"messages": [
{
"role": "user",
"content": "Review this service for concurrency defects, propose a safe fix, and define tests that verify the change."
}
],
"thinking": {"type": "enabled"},
"reasoning_effort": "max"
}'Response
The shortened example below illustrates the standard Chat Completions structure. Token counts and cost vary with the request and generated output.
{
"id": "chatcmpl-glm53-example",
"created": 1787083200,
"model": "glm-5.3",
"object": "chat.completion",
"system_fingerprint": null,
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The shared map is mutated without synchronization. Protect writes with a lock, keep reads on an immutable snapshot, and add race, cancellation, and rollback tests before deployment.",
"role": "assistant",
"thinking_blocks": [],
"annotations": []
}
}
],
"usage": {
"completion_tokens": 164,
"prompt_tokens": 31,
"total_tokens": 195,
"completion_tokens_details": null,
"prompt_tokens_details": {
"audio_tokens": null,
"cached_tokens": null,
"text_tokens": 31,
"image_tokens": null
}
},
"estimated_cost": {
"unit": "0.0007644000",
"irt": 87.6,
"exchange_rate": 114600
}
}SDK Usage Examples
curl https://api.avalai.ir/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-d '{
"model": "glm-5.3",
"messages": [
{
"role": "user",
"content": "Plan a staged refactor of this repository and include verification and rollback steps."
}
],
"thinking": {"type": "enabled"},
"reasoning_effort": "max"
}'from openai import OpenAI
client = OpenAI(
api_key="your-avalai-api-key",
base_url="https://api.avalai.ir/v1",
)
response = client.chat.completions.create(
model="glm-5.3",
messages=[
{
"role": "user",
"content": "Plan a staged refactor of this repository and include verification and rollback steps.",
}
],
extra_body={
"thinking": {"type": "enabled"},
"reasoning_effort": "max",
},
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir/v1",
});
const response = await client.chat.completions.create({
model: "glm-5.3",
messages: [
{
role: "user",
content: "Plan a staged refactor of this repository and include verification and rollback steps.",
},
],
thinking: { type: "enabled" },
reasoning_effort: "max",
});
console.log(response.choices[0].message.content);Migration Guidance
- Use the exact model ID
glm-5.3. - Remove any configuration that disables thinking and explicitly send
thinking.type: "enabled"when migrating existing GLM integrations. - Choose
reasoning_effort: "low","high", or"max"; usemaxfor difficult coding work. - Evaluate token budgets and latency because deeper reasoning can consume more output tokens.
- Confirm every required parameter and tool before using the partially supported
v1/responsesendpoint. - Apply least-privilege access, sandboxing, audit logs, and human review to security-sensitive workflows.