GLM 5.4 overview
GLM 5.4 by Zhipu AI
GLM 5.4 is the next model in Zhipu AI's GLM-5 line, built for coding work. It accepts text and images, keeps the full 1M-token context window of the GLM-5 series, and supports reasoning, function calling with parallel tool calls, structured output and streaming. It is coming soon to AI/ML API: the price below applies from launch.
GLM 5.4 specs
- Model ID
zhipu/glm-5.4- Developer
- Zhipu AI
- Context window
- 1,000,000 tokens
- Capabilities
- Vision, reasoning, function calling, parallel tool calls, structured output, streaming
- Input
- Text, Image
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
GLM 5.4 API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $1.33 | 1M tokens |
| Output | $4.18 | 1M tokens |
| Cached input | $0.247 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 23, 2026: Zhipu AI's list minus 5%. They apply from launch; GLM 5.4 is coming soon.
GLM 5.4 vs other models: token prices
AI/ML API input and output rates for 6 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $1.33 | $4.18 | |
| $1.12 | $3.52 | |
| $0.12 | $0.4 | |
| $0.37 | $1.25 | |
| $1.4 | $4.4 | |
| $3.5 | $11 |
How to use the GLM 5.4 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "zhipu/glm-5.4",
"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.4",
"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.4",
"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.4 FAQ
What is the context window of GLM 5.4?
GLM 5.4 has a 1,000,000 tokens context window.
What inputs and outputs does GLM 5.4 support?
GLM 5.4 takes text and images as input and returns text.
What is the model ID for GLM 5.4?
Use zhipu/glm-5.4 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
Is GLM 5.4 available now?
GLM 5.4 is coming soon to AI/ML API. Until launch the API answers a request for it with 503; it is listed in the model catalog with coming_soon set.
How much does GLM 5.4 cost?
GLM 5.4 costs $1.33 input and $4.18 output per 1M tokens on AI/ML API, 5% below Zhipu AI's list price, billed as you go with no subscription.
Does GLM 5.4 support streaming?
Yes, GLM 5.4 can stream responses as they are generated.
Who created GLM 5.4?
GLM 5.4 was built by Zhipu AI.