glm-5.4 API Pricing & Access
GLM-5.4 is Zhipu's flagship large model, utilizing the Loop Transformer architecture, capable of deeper reasoning with fewer parameters, with intelligence levels comparable to 2–3T models. It features built-in visual understanding, supports 1 million tokens of context, and excels at extending "programming" into creative scenarios such as video, gaming, and 3D modeling, which Zhipu refers to as "General Coding."
Pricing by group
USD per 1M tokens. Price = base price × group ratio.
| Group | Input | Output | Cache read | About this group |
|---|---|---|---|---|
| Self-Deployed-1 | $0.42 | $1.32 | $0.078 | Attractive discount, suitable for general Q&A |
| Self-Deployed-2 | $0.70 | $2.20 | $0.13 | Moderate price with good availability. Suitable for general reasoning, document reading |
| Self-Deployed-3 | $1.05 | $3.30 | $0.195 | Higher price. It excels at long-document sorting, logical reasoning and complex multi-turn image-text tasks with stable availability |
Snapshot taken at build time on 2026-12-03. Actual charges follow the live price table above and your console.
Capabilities
- Provider
- ChatGLM
- Features
- Conversation · Tools · Image Recognition
- API formats
- Anthropic Messages · OpenAI Chat Completions
Quick start
Base URL: https://api.openlux.ai/v1. Create an API key in the console and replace YOUR_API_KEY in the examples.
curl https://api.openlux.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI
client = OpenAI(base_url="https://api.openlux.ai/v1", api_key="YOUR_API_KEY")
resp = client.chat.completions.create(
model="glm-5.4",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)curl https://api.openlux.ai/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'Full parameters in the API docs
FAQ
How do I call the glm-5.4 API?
Sign up for OpenLux, create an API key in the console, set the base URL to https://api.openlux.ai/v1 and use glm-5.4 as the model name. The model also supports the Anthropic format, so you can call /v1/messages directly.
How is the glm-5.4 API billed?
Pay as you go: input and output tokens are priced separately, and the price depends on the group you choose. At build time the lowest public group was $0.42 per 1M input tokens and $1.32 per 1M output tokens. Top-ups start at $1.
How is prompt caching billed for glm-5.4?
Cache hits (cache reads) cost 0.185714285714× the input price.
Is there a Batch API?
Not at the moment. OpenLux has no Batch API; all requests are real-time calls billed as such. For bulk jobs, send concurrent requests to the regular endpoints.
Which API formats does glm-5.4 support?
Anthropic Messages, OpenAI Chat Completions.