Archive of AI

Source Snapshot / 2026-02-11-zhipu-glm-5-mit-4

GLM-5 Overview — Z.AI Developer Documentation

Linked event: 2026-02-11 · Zhipu AI (Z.ai) Open-Sources 744B Agentic Engineering Flagship GLM-5 Under MIT License With DSA Sparse Attention

Publisher
Z.ai
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / bb60eed17ece0019
Original URL
Open source ↗
Wayback Backup
Not archived
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

[来源关键摘录] Official developer documentation for GLM-5 covering agentic engineering capabilities and API/open-weight specifications.

[正文前段节选] Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Overview - Z.AI DEVELOPER DOCUMENT home page

API Reference

Released Notes

Terms and Policy

Copy pageCopy page

GLM-5 is Z.AI’s new-generation foundation model, designed for Agentic Engineering, capable of providing reliable productivity in complex system engineering and long-range Agent tasks. In terms of Coding and Agent capabilities, GLM-5 has achieved state-of-the-art (SOTA) performance in open source, with its usability in real programming scenarios approaching that of Claude Opus 4.5.

Foundation Model

Input Modalities

Output Modalitie

Context Length

Maximum Output Tokens

Thinking Mode

Offering multiple thinking modes for different scenarios

Streaming Output

Support real-time streaming responses to enhance user interaction experience

Function Call

Powerful tool invocation capabilities, enabling integration with various external toolsets

Context Caching

Intelligent caching mechanism to optimize performance in long conversations

Structured Output

Support for structured output formats like JSON, facilitating system integration

Agentic Coding

It can automatically generate runnable code based on natural language, covering development processes such as front-end, back-end, and data processing, significantly shortening the iteration cycle from requirements to products.

Capable of autonomous decision-making and tool invocation, it can complete the full-process intelligent agent tasks from understanding, planning to execution and self-check under ambiguous and complex objectives, achieving “input from a single sentence to complete deliverables”.

Work Scenario

With strong long-range planning and memory capabilities, it can stably complete complex work tasks that span multiple stages, involve multiple steps, and have strong logical connections, ensuring instruction compliance and goal consistency.

It can accurately understand and consistently maintain character settings, remain consistent in narrative, emotion, and logic, and achieve a natural, evolvable, and highly immersive role-playing experience.

Script / Storyboard Generation

Significantly enhanced in long text consistency and complex character development, it can stably output high-quality script content that can directly enter the production process.

Capable of accurately converting formal texts into professional translations that conform to the expression habits of the target language, achieving full alignment of semantics, terminology, and expression.

Text Data Extraction

It can accurately extract key fields and logical relationships from complex texts such as contracts, announcements, and financial reports, stably convert the original content into analyzable Structured Data, and contribute to enterprise data governance and automation.

Information Quality Inspection

It can accurately identify key information in complex texts such as customer service tickets and automatically complete quality inspection and risk identification, significantly improving Operational Efficiency.

Introducing GLM-5

Larger Foundation, Stronger Intelligence

The brand-new GLM-5 foundation lays a solid groundwork for the capability evolution from “writing code” to “building entire projects”:

Expanded Parameter Scale: Increased from 355B (32B activated) to 744B (40B activated), with pre-training data upgraded from 23T to 28.5T. Larger-scale pre-training computing power has significantly improved the model’s general intelligence.

Asynchronous Reinforcement Learning: A new “Slime” framework has been developed to support larger model scales and more complex reinforcement learning tasks, enhancing the efficiency of post-training workflows. An asynchronous agent reinforcement learning algorithm is proposed, enabling the model to continuously learn from long-range interactions and fully unlock the potential of pre-trained models.

Sparse Attention Mechanism: DeepSeek Sparse Attention is integrated for the first time, maintaining lossless long-text performance while drastically reducing model deployment costs and improving Token Efficiency.

Coding Performance on Par with Claude Opus 4.5

GLM-5 achieves performance alignment with Claude Opus 4.5 in software engineering tasks, reaching the highest scores among open-weight models across widely recognized industry benchmarks.On SWE-bench Verified and Terminal Bench 2.0, GLM-5 records leading open-model scores of 77.8 and 56.2, respectively — surpassing Gemini 3.0 Pro in overall performance.In internal evaluations aligned with the Claude Code task distribution, GLM-5 demonstrates substantial gains over GLM-4.7 across frontend development, backend systems engineering, and long-horizon execution tasks.The model can autonomously perform agentic long-range planning, backend refactoring, and deep debugging with minimal human intervention—delivering a development experience that approaches Opus 4.5 in both reliability and execution depth.

Agent Performance: SOTA-Level Long-Horizon Execution

GLM-5 achieves state-of-the-art performance among open-weight models in agentic capability, ranking first across multiple authoritative benchmarks. On BrowseComp (web-scale retrieval and information synthesis), MCP-Atlas (tool invocation and multi-step task execution), and τ²-Bench (complex multi-tool planning and orchestration), GLM-5 delivers top open-model results across the board.These capabilities define the core of Agentic Engineering. A capable agent must go beyond generating code or completing isolated tasks — it must sustain goal alignment over long horizons, manage intermediate resources, coordinate tool usage, and resolve multi-step dependencies without losing coherence.

API Documentation: Learn how to call the API.

The following is a full sample code to help you onboard GLM-5 with ease.

Official Python SDK

Official Java SDK

OpenAI Python SDK

curl -X POST "https://api.z.ai/api/paas/v4/chat/completions" \

-H "Content-Type: application/json" \

-H "Authorization: Bearer your-api-key" \

"model": "glm-5",

"messages": [

"role": "user",

"content": "As a marketing expert, please create an attractive slogan for my product."

"role": "assistant",

"content": "Sure, to craft a compelling slogan, please tell me more about your product."

"content": "Z.AI Open Platform"

"thinking": {

"type": "enabled"

"max_tokens": 4096,

"temperature": 1.0

Streaming Call

"stream": true,

# Install latest version

pip install zai-sdk

# Or specify version

pip install zai-sdk==0.2.3

Verify Installation

print(zai.__version__)

from zai import ZaiClient

client = ZaiClient(api_key="your-api-key") # Your API Key

response = client.chat.completions.create(

model="glm-5",

"content": "As a marketing expert, please create an attractive slogan for my product.",

"content": "Sure, to craft a compelling slogan, please tell me more about your product.",

{"role": "user", "content": "Z.AI Open Platform"},

"type": "enabled",

max_tokens=4096,

temperature=1.0,

# Get complete response

print(response.choices[0].message)

"type": "enabled", # Optional: "disabled" or "enabled", default is "enabled"

stream=True,

temperature=0.6,

# Stream response

for chunk in response:

if chunk.choices[0].delta.reasoning_content:

print(chunk.choices[0].delta.reasoning_content, end="", flush=True)

if chunk.choices[0].delta.content:

print(chunk.choices[0].delta.content, end="", flush=True)

Install SDKMaven

<dependency>

<groupId>ai.z.openapi</groupId>

<artifactId>zai-sdk</artifactId>

<version>0.3.5</version>

</dependency>

Gradle (Groovy)

implementation 'ai.z.openapi:zai-sdk:0.3.5'

import ai.z.openapi.ZaiClient;

import ai.z.openapi.service.model.ChatCompletionCreateParams;

import ai.z.openapi.service.model.ChatCompletionResponse;

import ai.z.openapi.service.model.ChatMessage;

[...内容已截断,完整版请查看原文或 Wayback 快照]