# Zhipu: GLM 5.1

Zhipu AI's GLM-5.1 follows GLM-5 as an open-weight, MIT-licensed text model for agentic coding and long-horizon work. It is built to plan, execute and refine one task over long sessions, and has a thinking mode.

- **Model id:** `opencheap/glm-5.1`
- **Price per 1M tokens:** $0.15 input / $0.46 output
- **Cached input:** $0.027 per 1M tokens
- **Context:** 202K tokens, 131K max output

## Providers

10 providers. Prices are per 1M tokens. As of 2026-12-04 11:56 UTC.

| Provider | Input price | Cache price | Output price | Latency | Speed | Uptime | Context | Max output |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Surplus · quantization unknown | $0.15 | $0.027 | $0.46 | 1.00 s | 83 tok/s | 100 % (success rate) | 200K | 24K |
| EmpirioLabs AI · quantization unknown | $0.87 | $0.17 | $3.47 | 1.45 s | 93 tok/s | 100 % (success rate) | 8K | — |
| NanoGPT · quantization unknown | $0.90 | $0.09 | $2.90 | 3.61 s | 36 tok/s | 83.3 % (success rate) | 202K | 65K |
| Chutes · fp8 | $0.94 | $0.095 | $3.04 | 3.69 s | 15 tok/s | 99.4 % | 202K | 65K |
| Qubax · quantization unknown | $0.95 | $0.19 | $3.82 | 1.93 s | 79 tok/s | 100 % (success rate) | 200K | 24K |
| StreamLake · fp8 | $1.01 | $0.19 | $3.19 | 3.90 s | 29 tok/s | 100 % | 200K | 128K |
| SiliconFlow · fp8 | $1.25 | $0.63 | $3.93 | 1.33 s | 64 tok/s | 99.6 % | 204K | 131K |
| Alibaba · fp8 | $1.40 | $0.26 | $4.39 | 0.94 s | 59 tok/s | 100 % | 202K | 131K |
| Baidu · fp8 | $1.47 | $0.27 | $4.62 | — | — | 99.5 % | 202K | 131K |
| Z.AI · fp8 | $1.47 | $0.27 | $4.62 | 0.93 s | 54 tok/s | 99.8 % | 202K | 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`
- **EmpirioLabs AI:** `temperature`, `top_p`, `top_k`, `min_p`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **NanoGPT:** `temperature`, `top_p`, `seed`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Chutes:** `temperature`, `top_p`, `top_k`, `seed`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Qubax:** `temperature`, `top_p`, `logit_bias`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`
- **StreamLake:** `temperature`, `top_p`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **SiliconFlow:** `temperature`, `top_p`, `top_k`, `frequency_penalty`, `tools`, `tool_choice`, `reasoning`, `include_reasoning` (stop not confirmed)
- **Alibaba:** `temperature`, `top_p`, `top_k`, `seed`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `logprobs`, `top_logprobs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Baidu:** `temperature`, `top_p`, `repetition_penalty`, `frequency_penalty`, `presence_penalty`, `stop`, `response_format`, `structured_outputs`, `tools`, `tool_choice`, `reasoning`, `include_reasoning`
- **Z.AI:** `temperature`, `top_p`, `top_k`, `response_format`, `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.1#price-history).

## API

Point the OpenAI SDK at OpenCheap and pass the model id `opencheap/glm-5.1`; 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.1", "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.1",
    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.1",
  messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);
```

## About GLM 5.1

GLM 5.1 costs from $0.15 per 1M input tokens and $0.46 per 1M output tokens on OpenCheap, with cached input at $0.027 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 89 % less here. At that price, a request with 10,000 input tokens and 1,000 output tokens costs about $0.0019, and 1,000 such requests about $1.94. Prices as of 2026-12-04 11:48 UTC.

10 providers serve GLM 5.1 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 202K tokens (202,752), room for roughly 150,000 words of English in one request.

GLM 5.1 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.1 API cost per 1M tokens?

GLM 5.1 costs from $0.15 per 1M input tokens and $0.46 per 1M output tokens on OpenCheap, with cached input at $0.027 per 1M tokens. Prices as of 2026-12-04 11:48 UTC.

### What does one GLM 5.1 request cost?

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

### Is GLM 5.1 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 89 % less here.

### Which providers serve GLM 5.1?

10 providers serve GLM 5.1 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.1?

Its context window is 202K tokens (202,752), room for roughly 150,000 words of English in one request.

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

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

## More from Zhipu

- [GLM 5.1 Thinking](https://opencheap.si/models/glm-5.1:thinking) (`glm-5.1:thinking`): $1.40 / $4.40 per 1M · 204K 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.07 / $0.22 per 1M · 1M 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
- [GLM 4.5 Air](https://opencheap.si/models/glm-4.5-air) (`glm-4.5-air`): $0.098 / $0.60 per 1M · 131K context

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

## Similar models

- [DeepSeek V3.2](https://opencheap.si/models/deepseek-v3.2): DeepSeek · 163K context · $0.22 / $0.34 per 1M, 20 % cheaper · [Compare with GLM 5.1](https://opencheap.si/compare/glm-5.1-vs-deepseek-v3.2)
- [Ternary Bonsai 2 27B](https://opencheap.si/models/ternary-bonsai-2-27b): PrismML · 262K context · $0.075 / $0.50 per 1M · [Compare with GLM 5.1](https://opencheap.si/compare/glm-5.1-vs-ternary-bonsai-2-27b)
- [Nex N2.6](https://opencheap.si/models/nex-n2.6): Nex AGI · 262K context · $0.15 / $0.50 per 1M · [Compare with GLM 5.1](https://opencheap.si/compare/glm-5.1-vs-nex-n2.6)
- [Qwen3.5 397B A17B](https://opencheap.si/models/qwen3.5-397b-a17b): Qwen · 262K context · $0.10 / $0.68 per 1M · [Compare with GLM 5.1](https://opencheap.si/compare/glm-5.1-vs-qwen3.5-397b-a17b)
- [Qwen3.5 27B](https://opencheap.si/models/qwen3.5-27b): Qwen · 262K context · $0.085 / $0.68 per 1M · [Compare with GLM 5.1](https://opencheap.si/compare/glm-5.1-vs-qwen3.5-27b)
- [Gemma SEA-LION v4 27B](https://opencheap.si/models/gemma-sea-lion-v4-27b): Google · 131K context · $0.24 / $0.48 per 1M · [Compare with GLM 5.1](https://opencheap.si/compare/glm-5.1-vs-gemma-sea-lion-v4-27b)

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

---

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