Speed
Output tokens / second
Custom pricing for production workloads
Advanced version of GLM-4.6 with web search integration and enhanced capabilities
GLM-4.6 API delivers advanced reasoning and coding capabilities for complex tasks, agentic workflows, and AI applications.
zhipu/glm-4.6https://api.aimlapi.com/v1GLM-4.6 is an advanced large language model developed by Zhipu AI (now Z.ai), featuring a state-of-the-art 355 billion parameter Mixture of Experts (MoE) architecture. It is optimized for a broad range of tasks including complex reasoning, coding, writing, and multi-turn dialogue with an extended context window of 200,000 tokens. GLM-4.6 demonstrates industry-leading performance, especially in programming and agentic tasks, making it a top choice for developers and enterprises seeking efficiency and versatility.
GLM-4.6 has been rigorously evaluated across authoritative benchmarks demonstrating competitive or superior results against leading models:
Vs. GLM-4.5: GLM-4.6 offers noticeable improvements in code generation accuracy and maintains a consistent edge in handling ultra-long context inputs, while retaining strong agentic task performance close to GLM-4.5.
Vs. OpenAI GPT-4.5: GLM-4.6 narrows the gap in reasoning and multi-step task accuracy, leveraging its much larger context window; however, GPT-4.5 still leads in raw task precision on some standardized benchmarks.
Vs. Claude 4 Sonnet: While Claude 4 Sonnet excels in coding and multi-agent efficiency, GLM-4.6 matches or surpasses it in agentic reasoning and long-document comprehension, making it stronger for extended-context applications.
Vs. Gemini 2.5 Pro: GLM-4.6 balances advanced reasoning and coding capabilities with enhanced long-form document understanding, whereas Gemini 2.5 Pro is more focused on optimizing individual coding and reasoning benchmarks.
Accessible via AI/ML API. Documentation: available here.
See how GLM-4.6 compares in generation speed and latency. Data retrieved Nov 3, 2026.
Output tokens / second
Compare 13 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Reasoning across long documents of about 100k tokens.
Following precise instructions about the shape of the answer.
Customer support agent tasks with tool calls.
| Usage | Price | Unit |
|---|---|---|
| Input | $0.6 | 1M tokens |
| Output | $2.2 | 1M tokens |
| Cached input | $0.11 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.6 | $2.2 | |
| $0.15 | $0.5 | |
| $0.37 | $1.25 | |
| $1.4 | $4.4 | |
| $3.5 | $11 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "zhipu/glm-4.6",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "zhipu/glm-4.6",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "zhipu/glm-4.6",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());GLM-4.6 has a 200,000 tokens context window and can return up to 128,000 tokens.
GLM-4.6 takes text as input and returns text.
Use zhipu/glm-4.6 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
GLM-4.6 became available on October 2, 2025.
GLM-4.6 costs $0.6 input and $2.2 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, GLM-4.6 can stream responses as they are generated.
GLM-4.6 was built by Zhipu AI.