Developer Dashboard

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_effort accepts low, high, or max
  • 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

EvaluationGLM-5.3GLM-5.2
Terminal-Bench 3.028.34.6
DeepSWE v1.166.946.2
Agents' Last Exam28.523.8
CyberGym84.577.2
ExploitBench54.424.4

Benchmark results are directional evidence. Evaluate the model with representative repositories, tools, security controls, and acceptance criteria before routing production traffic.

Endpoint Availability

EndpointSupportNotes
v1/chat/completionsSupportedOpenAI-compatible Chat Completions
v1/messagesSupportedAnthropic-compatible Messages API
v1/responsesPartial supportVerify required parameters and tools before production use

Pricing

Prices are in USD per 1 million tokens.

InputCached InputOutput
$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.

json
{
  "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

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

json
{
  "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

bash
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"
  }'
python
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)
javascript
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"; use max for 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/responses endpoint.
  • Apply least-privilege access, sandboxing, audit logs, and human review to security-sensitive workflows.