glm-5.4 — API, Pricing & Context Window | Vivgrid
Use GLM-5.4 on Vivgrid with a 1M-token context window, up to 128,000 output tokens, and text or image inputs.
glm-5.4 is Zhipu AI's flagship model for coding and long-running agents. It succeeds glm-5.3 at the same per-token price and adds image input.
Send requests to Vivgrid's OpenAI-compatible Chat Completions API (/v1/chat/completions) with model: "glm-5.4". Set reasoning_effort to low, high, or max to control how much reasoning the model performs. The model is served from APAC and is accessible worldwide.
Specifications
| Provider | Zhipu AI |
| Model ID | glm-5.4 |
| Best for | Coding |
| Available on | Vibe coding, Chat Completions |
| Context window | 1,000,000 tokens |
| Max output | 128,000 tokens |
| Modalities | Text, Image |
| Tool / function calling | Yes |
| Knowledge cutoff | — |
| Acceleration | 🌐 Global (Centralized) |
Pricing
Pricing in USD per 1M tokens.
| Input | Cached input | Output |
|---|---|---|
| $1.20 | $0.30 | $4.20 |
What one request costs
The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.
| Request | Cost |
|---|---|
| Cold prompt, nothing cached | $0.0324 |
| Warm prompt, 90% of the input served from cache | $0.0162 |
API surfaces
The Vivgrid Console catalogs glm-5.4 on 2 surfaces, all behind the same API key. The endpoint shown is the one the Console previews for that surface.
| Surface | Primary endpoint | Use it for |
|---|---|---|
| Vibe coding | /chat/completions | Coding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop. |
| Chat Completions | /chat/completions | Agent projects, where Vivgrid injects the model, system prompt and tools server-side, and Model API calls that name the model per request. |
Quick start
Get an API key from the Vivgrid Console, then call glm-5.4 directly.
curl https://api.vivgrid.com/v1/chat/completions \
-H "Authorization: Bearer $VIVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"messages": [
{ "role": "user", "content": "Say hello in English, Chinese and Spanish." }
],
"stream": true
}'Choosing within the GLM family
Prices are USD per 1M tokens at the base rate. Rows marked this page are the model described here.
| Model | Context | Max output | Input | Output |
|---|---|---|---|---|
glm-5.4 — this page | 1,000,000 | 128,000 | $1.20 | $4.20 |
glm-5.3 | 1,000,000 | 128,000 | $1.20 | $4.20 |
glm-5.3-flash | 1,000,000 | 128,000 | $0.15 | $0.50 |
Ideal use cases
- Navigate large repositories and coordinate changes across multiple files.
- Use screenshots to investigate UI regressions alongside the relevant source code.
- Chain tool calls in long-running coding and debugging sessions.
- Analyze technical documents and diagrams alongside text.
Related models
- glm-5.3 — the prior GLM flagship release.
- glm-5.3-flash — a lower-cost GLM model with vision support.
- kimi-k2.8-preview — another model for coding and multi-step tool use.