# Zhipu: GLM 5.4

GLM-5.4 is Z.ai's flagship model, built on a Loop Transformer that reuses layers across two passes for deeper reasoning. It accepts video, images, text and files, returns text, and is aimed at generalized coding.

- **Model id:** `opencheap/glm-5.4`
- **Price per 1M tokens:** $0.70 input / $2.20 output
- **Cached input:** $0.13 per 1M tokens
- **Context:** 1M tokens, 131K max output

## Providers

13 providers. Prices are per 1M tokens. As of 2026-12-04 12:06 UTC.

| Provider | Input price | Cache price | Output price | Latency | Speed | Uptime | Context | Max output |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Surplus · quantization unknown | $0.70 | $0.13 | $2.20 | 1.37 s | — | 96.1 % (success rate) | 1M | 131K |
| Qubax · quantization unknown | $0.80 | $0.065 | $2.52 | — | — | — | 1M | 131K |
| AiHubMix · quantization unknown | $1.18 | $0.29 | $4.12 | — | — | — | 1M | 131K |
| PrimeIntellect · quantization unknown | $1.26 | $0.23 | $4.20 | 1.01 s | 137 tok/s | 99.3 % | 1M | 131K |
| deeprelay · quantization unknown | $1.28 | $0.24 | $4.02 | — | — | — | 1M | 131K |
| NanoGPT · quantization unknown | $1.40 | $0.26 | $4.40 | — | — | — | 1M | 131K |
| Sandbase · quantization unknown | $1.40 | $0.26 | $4.40 | — | — | — | — | — |
| BaseTen · fp8 | $1.47 | $0.19 | $4.62 | 0.89 s | 134 tok/s | 99.7 % | 1M | 262K |
| Crusoe · fp8 | $1.47 | $0.27 | $4.62 | 1.19 s | 84 tok/s | 100 % | 1M | 943K |
| Friendli · quantization unknown | $1.47 | $0.27 | $4.62 | 0.87 s | 146 tok/s | 100 % | 1M | 943K |
| Inferact vLLM · quantization unknown | $1.47 | $0.27 | $4.62 | 4.32 s | 37 tok/s | 100 % | 1M | 943K |
| Modal · quantization unknown | $1.47 | $0.27 | $4.62 | 0.59 s | 160 tok/s | 100 % | 1M | 943K |
| Z.AI · fp8 | $1.47 | $0.27 | $4.62 | 1.92 s | 67 tok/s | 100 % | 1M | 131K |

A request picks by price (`:floor`) or by speed (`provider.sort`, `:nitro`), or sets a floor on tokens per second. [How routing works](https://docs.opencheap.si/speed)

### Supported parameters

The parameters each provider supports on this model, from its published list and our own tests of whether answers show the parameter taking effect. A test is a snapshot, not a guarantee; `provider.require_parameters` sends a request only to providers that support every parameter it sets. [Required parameters](https://docs.opencheap.si/speed#require-parameters)

- **Surplus:** `temperature`, `top_p`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`
- **Qubax:** `temperature`, `top_p`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`
- **AiHubMix:** `temperature`, `top_p`, `top_k`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`
- **PrimeIntellect:** `temperature`, `top_p`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning` (stop not confirmed)
- **deeprelay:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **NanoGPT:** `temperature`, `top_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Sandbase:** `temperature`, `top_p`, `top_k`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`
- **BaseTen:** `temperature`, `top_p`, `frequency_penalty`, `presence_penalty`, `stop`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Crusoe:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `logit_bias`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Friendli:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Inferact vLLM:** `temperature`, `top_p`, `top_k`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Modal:** `temperature`, `top_p`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Z.AI:** `temperature`, `top_p`, `top_k`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning` (stop not confirmed)

## Price history

Each provider's price over the last 24 hours, 7 days and 30 days is charted on [the page](https://opencheap.si/models/glm-5.4#price-history).

## API

Point the OpenAI SDK at OpenCheap and pass the model id `opencheap/glm-5.4`; the rest of your code stays the same.

```bash
curl https://api.opencheap.si/v1/chat/completions \
  -H "Authorization: Bearer $OPENCHEAP_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "opencheap/glm-5.4", "messages": [{ "role": "user", "content": "Hi" }] }'
```

```python
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.opencheap.si/v1", api_key=os.environ["OPENCHEAP_API_KEY"])
r = client.chat.completions.create(model="opencheap/glm-5.4",
    messages=[{"role": "user", "content": "Hi"}])
print(r.choices[0].message.content)
```

```javascript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.opencheap.si/v1", apiKey: process.env.OPENCHEAP_API_KEY });
const r = await client.chat.completions.create({ model: "opencheap/glm-5.4",
  messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);
```

## About GLM 5.4

GLM 5.4 costs from $0.70 per 1M input tokens and $2.20 per 1M output tokens on OpenCheap, with cached input at $0.13 per 1M tokens. Its list price is $1.40 per 1M input tokens and $4.40 per 1M output tokens, so on a typical 1 : 3 input-to-output mix it costs 50 % less here. At that price, a request with 10,000 input tokens and 1,000 output tokens costs about $0.0092, and 1,000 such requests about $9.20. Prices as of 2026-12-04 12:01 UTC.

13 providers serve GLM 5.4 on OpenCheap. Each request goes to the cheapest healthy provider of the model, and every answer reports what it cost in `usage.cost`. Its context window is 1M tokens (1,048,576), room for roughly 790,000 words of English in one request.

GLM 5.4 is one of [53 Zhipu models](https://opencheap.si/models/lab/zhipu) on OpenCheap. Every model on OpenCheap is called with one key at the same OpenAI-compatible endpoint, `https://api.opencheap.si/v1`.

## Pricing questions

### How much does the GLM 5.4 API cost per 1M tokens?

GLM 5.4 costs from $0.70 per 1M input tokens and $2.20 per 1M output tokens on OpenCheap, with cached input at $0.13 per 1M tokens. Prices as of 2026-12-04 12:01 UTC.

### What does one GLM 5.4 request cost?

A request with 10,000 input tokens and 1,000 output tokens costs about $0.0092, and 1,000 such requests about $9.20. Every answer reports its own cost in usage.cost.

### Is GLM 5.4 cheaper on OpenCheap than its list price?

Its list price is $1.40 per 1M input tokens and $4.40 per 1M output tokens, so on a typical 1 : 3 input-to-output mix it costs 50 % less here.

### Which providers serve GLM 5.4?

13 providers serve GLM 5.4 on OpenCheap. Each request goes to the cheapest healthy provider of the model; the table on this page lists every provider with its price, speed and uptime.

### What is the context window of GLM 5.4?

Its context window is 1M tokens (1,048,576), room for roughly 790,000 words of English in one request.

### How do I call the GLM 5.4 API?

Point the OpenAI SDK at https://api.opencheap.si/v1 and pass the model id opencheap/glm-5.4. One OpenCheap key works for every model; the rest of your code stays the same.

## More from Zhipu

- [GLM 5.4 Thinking](https://opencheap.si/models/glm-5.4:thinking) (`glm-5.4:thinking`): $1.40 / $4.40 per 1M · 1M context
- [GLM 5.3](https://opencheap.si/models/glm-5.3) (`glm-5.3`): $0.12 / $0.037 per 1M · 1M context
- [GLM 5.3 Flash](https://opencheap.si/models/glm-5.3-flash) (`glm-5.3-flash`): $0.0064 / $0.022 per 1M · 1M context
- [GLM 5.2](https://opencheap.si/models/glm-5.2) (`glm-5.2`): $0.32 / $0.32 per 1M · 1M context
- [GLM 5.1](https://opencheap.si/models/glm-5.1) (`glm-5.1`): $0.14 / $0.45 per 1M · 204K context
- [GLM 4.7](https://opencheap.si/models/glm-4.7) (`glm-4.7`): $0.032 / $0.14 per 1M · 202K context
- [GLM 4.6](https://opencheap.si/models/glm-4.6) (`glm-4.6`): $0.044 / $0.18 per 1M · 202K context
- [GLM 4.5](https://opencheap.si/models/glm-4.5) (`glm-4.5`): $0.15 / $0.55 per 1M · 131K context

[All 53 Zhipu models](https://opencheap.si/models/lab/zhipu)

## Similar models

- [Kimi K3](https://opencheap.si/models/kimi-k3): Moonshot · 1M context · $1.57 / $0.94 per 1M, 40 % cheaper · [Compare with GLM 5.4](https://opencheap.si/compare/glm-5.4-vs-kimi-k3)
- [Nvidia Nemotron 3 Ultra 550B](https://opencheap.si/models/nemotron-3-ultra-550b-a55b): NVIDIA · 1M context · $0.45 / $2.19 per 1M · [Compare with GLM 5.4](https://opencheap.si/compare/glm-5.4-vs-nemotron-3-ultra-550b-a55b)
- [Muse Spark 1.3](https://opencheap.si/models/muse-spark-1.3): Meta · 1M context · $0.63 / $2.13 per 1M · [Compare with GLM 5.4](https://opencheap.si/compare/glm-5.4-vs-muse-spark-1.3)
- [GPT 6.2 Sol](https://opencheap.si/models/gpt-6.2-sol): OpenAI · 1M context · $0.40 / $2.00 per 1M, 12 % cheaper · [Compare with GLM 5.4](https://opencheap.si/compare/glm-5.4-vs-gpt-6.2-sol)
- [GPT 6.1 Terra](https://opencheap.si/models/gpt-6.1-terra): OpenAI · 1M context · $0.41 / $2.05 per 1M, 10 % cheaper · [Compare with GLM 5.4](https://opencheap.si/compare/glm-5.4-vs-gpt-6.1-terra)
- [Kimi K3.1 Pro](https://opencheap.si/models/kimi-k3.1-pro): Moonshot · 1M context · $0.21 / $1.07 per 1M, 53 % cheaper · [Compare with GLM 5.4](https://opencheap.si/compare/glm-5.4-vs-kimi-k3.1-pro)

[Compare GLM 5.4 with any model](https://opencheap.si/compare)

---

Source: https://opencheap.si/models/glm-5.4 · All models: https://opencheap.si/models · Prices as JSON: https://api.opencheap.si/v1/prices · Index for agents: https://opencheap.si/llms.txt
