Speed
Output tokens / second
Custom pricing for production workloads
GLM-5 is Zhipu AI next-generation 745B MoE LLM for high-quality text generation and reasoning, optimized for chat, long-form content, and instruction-following tasks.
Designed to power modern AI products, GLM-5 API delivers strong performance across text generation, structured outputs, code understanding, and complex analytical tasks.
zhipu/glm-5https://api.aimlapi.com/v1GLM-5 is an advanced LLM developed to support complex reasoning, long-context understanding, and multilingual text generation. It combines deep semantic comprehension with strong instruction following, enabling developers to build reliable AI assistants, automation workflows, coding copilots, and knowledge systems. The model is optimized for both conversational AI and structured outputs, making it suitable for chat interfaces, data extraction pipelines, agentic systems, and enterprise integrations.
GLM-5 is optimized for stable inference and predictable behavior in production environments. It demonstrates strong instruction adherence, reduced hallucination patterns compared to earlier-generation models, and improved contextual retention in extended conversations.
GLM-5 is built to handle analytical tasks, multi-step reasoning, and structured data generation. It can reliably produce JSON outputs, formatted reports, and schema-aligned responses, making it ideal for backend integrations and automation tools.
GLM-5 supports extended context windows, allowing it to process large documents, maintain conversation continuity, and reason over complex multi-paragraph inputs. This makes it well-suited for research assistants, legal document analysis, and enterprise knowledge management systems.
GLM-5 performs effectively in code completion, debugging assistance, and technical documentation generation. It supports modern programming workflows and can be integrated into developer tools, CI/CD pipelines, and AI-powered IDE assistants.
Create high-quality blog posts, technical documentation, marketing copy, and multilingual content with strong consistency and structure.
GLM-5 is documented as suited to complex systems engineering and long-horizon agentic tasks. It is also described as strong for real-world coding and end-to-end software development tasks.
The model is documented for building agentic applications that use native tool calling, function execution, and long-horizon task planning. It is also suited to office workflows that require stable completion of complex, multi-step tasks across stages.
GLM-5 is documented for roleplay, with support for maintaining character settings consistently over time. It is also documented for text data extraction from complex documents such as contracts, announcements, and financial reports.
See how GLM-5 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 | $1 | 1M tokens |
| Output | $3.2 | 1M tokens |
| Cached input | $0.2 | 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 |
|---|---|---|
| $1 | $3.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-5",
"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-5",
"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-5",
"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-5 has a 200,000 tokens context window and can return up to 128,000 tokens.
GLM-5 takes text as input and returns text.
Use zhipu/glm-5 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
GLM-5 became available on February 12, 2026.
GLM-5 costs $1 input and $3.2 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, GLM-5 can stream responses as they are generated.
GLM-5 was built by Zhipu AI.
GLM-5 is a 745B parameter mixture-of-experts (MoE) model.