Zhipu GLMglm-5.4
Z.ai's latest flagship, the first GLM built on the Loop Transformer architecture
$0.84/ 1M input tokens-40%$1.4official price
- 1M context
- Up to 128K output
- Effort low to max
- Always thinks
- Modality
- Text
- Endpoint
- /v1/chat/completions
- Model ID
- glm-5.4
- Provider
- Zhipu GLM
GLM-5.4 API overview
Documented endpoint
Requests go to /v1/chat/completions in Z.ai's own format; /v1/responses and /v1/messages are converted to it.
Model provider
GLM-5.4 is published by Zhipu GLM and is called through the API model ID glm-5.4.
Output and limits
1,000,000-token context; up to 128,000 output tokens; text in, text out.
GLM-5.4 API pricing
GLM-5.4 is billed 40% below the official list price on every metered dimension below.
| Item | ArgoLink rate | Official price | You save |
|---|---|---|---|
| Input tokens | $0.84 / 1M tokens | -40% | |
| Cached input tokens | $0.156 / 1M tokens | -40% | |
| Cache write tokens | $0 / 1M tokens | -40% | |
| Output tokens | $2.64 / 1M tokens | -40% |
Reasoning tokens are billed as output tokens.
GLM-5.4 API reference
Quick start
Create an API key in the console, then use the Base URL, endpoint, and request body shown on this page.
curl -sS https://argolink.io/v1/chat/completions \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"messages": [{"role": "user", "content": "Explain what this model is good at in one sentence."}],
"stream": false
}'
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ARGOLINK_API_KEY"],
base_url="https://argolink.io/v1",
)
response = client.chat.completions.create(
model="glm-5.4",
messages=[{"role": "user", "content": "Explain what this model is good at in one sentence."}],
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ARGOLINK_API_KEY,
baseURL: "https://argolink.io/v1",
});
const response = await client.chat.completions.create({
model: "glm-5.4",
messages: [{ role: "user", content: "Explain what this model is good at in one sentence." }],
});
console.log(response.choices[0].message.content);
Protocols
Chat Completions
Recommended: the model's own format
Z.ai's own format: every field reaches the model exactly as sent.
curl https://argolink.io/v1/chat/completions \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"messages": [{"role": "user", "content": "Compare optimistic and pessimistic locking in three bullet points."}],
"reasoning_effort": "high"
}'
| Field | Value |
|---|---|
messages | system, user, assistant and tool turns of text; this model reads no images |
thinking | always on; leave it out |
reasoning_effort | low · high · max; defaults to max; medium runs as high, xhigh runs as max |
max_completion_tokens | up to 128,000 |
stream | true streams server-sent events |
service_tier | not supported; leave it out |
Responses and Anthropic Messages
Converted to Chat Completions
Codex, Claude Code and other clients that send these formats reach the model through Chat Completions, which the gateway converts them to.
curl https://argolink.io/v1/responses \
-H "Authorization: Bearer $ARGOLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"input": "Compare optimistic and pessimistic locking in three bullet points."
}'
curl https://argolink.io/v1/messages \
-H "x-api-key: $ARGOLINK_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.4",
"max_tokens": 4000,
"messages": [{"role": "user", "content": "Compare optimistic and pessimistic locking in three bullet points."}]
}'
| Field | Value |
|---|---|
input | text; input_file parts are dropped |
messages | text and tool blocks |
reasoning.effort | the same values as reasoning_effort |
output_config.effort | the same values; sent as medium when left out |
Web search and other server-side tools are dropped in both conversions.
GLM-5.4 full request parameters
| Parameter | Type | Requirement | What it does |
|---|---|---|---|
model | string | required | The catalog identifier for this page: glm-5.4. |
messages | array | required | System, user, assistant and tool turns of text. This model reads no images. |
thinking | object | optional | Thinking: always on; leave it out. |
reasoning_effort | string | optional | Reasoning depth: low · high · max; defaults to max; medium runs as high, xhigh runs as max. |
max_completion_tokens | integer | optional | Caps the answer: up to 128,000. max_tokens works too. |
tools · tool_choice | array · string or object | optional | Function tools and how the model picks one. |
stream | boolean | optional | true streams chunks whose choices[].delta carry the text. |
service_tier | string | not supported | There is no faster tier for this model; leave it out. |
GLM-5.4 API compared with similar models
| Model | Model ID | Provider | Rate | Best for |
|---|---|---|---|---|
| GLM-5.4 | glm-5.4 | Zhipu GLM | $0.84 / 1M input tokens | Z.ai's latest flagship, the first GLM built on the Loop Transformer architecture |
| GPT-6 Astra | gpt-6-astra | OpenAI | $2.3 / 1M input tokens | OpenAI's most capable model, built for the hardest end-to-end work |
| Claude Opus 5 | claude-opus-5 | Anthropic | $1.75 / 1M input tokens | For complex agentic coding and enterprise work |
| Claude Fable 5.1 | claude-fable-5-1 | Anthropic | $3.5 / 1M input tokens | Anthropic's model for demanding reasoning and long-horizon agentic work |
More models from this provider
- GLM-5.1Z.ai's general-purpose GLM for chat and coding$0.84 / 1M input tokens
- GLM-5.2Z.ai's general-purpose GLM for reasoning and coding$0.84 / 1M input tokens
- GLM-5.3Z.ai's flagship for complex software engineering and long-horizon agent work$0.84 / 1M input tokens
- GLM-5.3 FlashThe lowest-cost GLM-5, and the first in the series to read images$0.09 / 1M input tokens
Other models in this modality
- GPT-6 AstraOpenAI's most capable model, built for the hardest end-to-end work$2.3 / 1M input tokens
- Claude Opus 5For complex agentic coding and enterprise work$1.75 / 1M input tokens
- Claude Fable 5.1Anthropic's model for demanding reasoning and long-horizon agentic work$3.5 / 1M input tokens
- Claude Fable 5Anthropic's Fable model for long-running agentic work$3.5 / 1M input tokens
GLM-5.4 API FAQ
How do I call GLM-5.4?
Create an API key in the console and POST https://argolink.io/v1/chat/completions with model set to glm-5.4 and your key in the Authorization header as a Bearer token. /v1/responses and /v1/messages work too; the gateway converts them to Chat Completions.
How much does GLM-5.4 cost?
$0.84 per million input tokens and $2.64 per million output tokens, 40% below the official rates. Cached input costs $0.156 per million. Reasoning tokens are billed as output tokens.
What are GLM-5.4's context and output limits?
1,000,000-token context; up to 128,000 output tokens; text in, text out.
How do I control GLM-5.4's reasoning?
It always thinks. Set reasoning_effort to low, high or max; left out, it runs at max; medium runs as high, xhigh runs as max.
Can GLM-5.4 read images?
No. It reads text only.