---
last_updated: 2026-11-27
source_url: https://opper.ai/zhipu/glm-5-1
title: "GLM 5.1 by Z.ai"
description: "GLM-5.1 by Z.ai is a 754B open-weight (MIT) coding and agentic reasoning model with 202K context that tops SWE-Bench Pro at 58.4."
---

# GLM 5.1

By [Z.ai](https://opper.ai/zhipu).

Released 7 Apr 2026, 6 days after [GLM-5V-Turbo](https://opper.ai/zhipu/glm-5v-turbo) · [Announcement](https://docs.z.ai/release-notes/new-released) · [All Z.ai releases](https://opper.ai/model-releases/zhipu)

GLM-5.1 is Z.ai's flagship open-weight model, released in April 2026 with a sparse Mixture of Experts architecture totaling 754 billion parameters and roughly 40 billion active per token. It supports a 202,752-token context window and can generate up to 128,000 tokens per response, suiting it to long document analysis and extended code generation.

Built for autonomous software engineering, GLM-5.1 reports a state-of-the-art 58.4 on SWE-Bench Pro, ahead of Claude Opus 4.6 (57.3) and GPT-5.4 (57.7), and is designed for multi-step agentic workflows where it can sustain a single task for up to eight hours across planning, execution, testing, and refinement. Rather than single-pass generation, it iteratively drafts, evaluates, and revises solutions toward production-ready code.

Released under the MIT license on Hugging Face, GLM-5.1 supports function calling, thinking modes, structured output, context caching, and tool use, and can be self-hosted, fine-tuned, and deployed commercially without restrictive licensing terms.

Stronger on coding and agentic tasks than on broad general reasoning, GLM-5.1 also handles multilingual content and supports streaming output during tool execution for real-time development feedback.

## Available routes

GLM 5.1 runs on 4 different routes through the Opper gateway. Prices are per 1M tokens. Its routes and prices, live from the catalogue, are public JSON with no API key needed at https://api.opper.ai/v3/models?q=glm-5.1.

| Provider | Model id | Region | Zero data retention | Training | Input | Output | Cache read |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Alibaba Cloud](https://opper.ai/provider/alibaba) | `alibaba:global/glm-5.1` | Multi-region | Abuse monitoring | No | $0.90 | $3.60 | $0.18 |
| [Baidu Qianfan](https://opper.ai/provider/baidu) | `baidu:cn/glm-5.1` | Multi (China) | Retained | Unknown | $1.40 | $4.40 | $0.26 |
| [Novita](https://opper.ai/provider/novita) | `novita/zai-org/glm-5.1` | US (United States) | Yes | No | $1.38 | $4.40 | $0.26 |
| [Z.ai](https://opper.ai/provider/zai) | `zai/glm-5.1` | Multi (Singapore) | Abuse monitoring | No | $1.40 | $4.40 | $0.26 |

## Key info

- Model id: `glm-5.1` (routes across Alibaba Cloud, Novita)
- Input: Text
- Output: Text
- Features: Reasoning, Tools, Structured output
- Context window: 203K
- Max output: 131K
- Input price: $0.90 per 1M tokens ($0.18 cache read)
- Output price: $3.60 per 1M tokens
- Released: 7 Apr 2026
- US residency available on Novita
- Zero data retention on pay-as-you-go

## Data handling per route

Each route hosting GLM 5.1 has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

### Alibaba Cloud — Multi-region

Zero data retention with abuse monitoring: prompts and outputs are kept for abuse monitoring only, for a window the provider does not state, and are not used for training. No training on customer data. GLOBAL; SCCs.

- Zero data retention: With abuse monitoring, window not stated.
- Training: No training on customer data.
- Logging: Abuse monitoring
- Abuse monitoring: On by default, holds flagged content
- Caching: Prompt cache
- Transfer mechanism: SCCs

Verified by Opper on 2026-09-16.

### Baidu Qianfan — China

Content is retained: provider logging. Training posture pending review. GLOBAL; unknown.

- Zero data retention: Retained: provider logging.
- Logging: Other
- Abuse monitoring: Always on, holds flagged content, a person can view samples
- Transfer mechanism: unknown

Verified by Opper on 2026-09-17.

### Novita — United States

Zero data retention: nothing is logged, held for abuse monitoring or used for training. No training on customer data. US; SCCs.

- Zero data retention: Yes. Nothing is logged, held for abuse monitoring or used for training.
- Training: No training on customer data.
- Logging: None
- Abuse monitoring: On by default, keeps nothing
- Transfer mechanism: SCCs

Verified by Opper on 2026-09-15.

### Z.ai — Singapore

Zero data retention with abuse monitoring: nothing is logged or used for training; content flagged by abuse monitoring is held for review. No training on customer data. GLOBAL; unknown.

- Zero data retention: With abuse monitoring, flagged content held.
- Training: No training on customer data.
- Logging: None
- Abuse monitoring: On by default, holds flagged content
- Caching: Prompt cache
- Subprocessor access: Subprocessors may read content
- Transfer mechanism: unknown

Verified by Opper on 2026-09-15.

## Best for

Where GLM 5.1 ranks among the models on Opper with a score for each use case (0 to 100).

- [Agents](https://opper.ai/models?use=agents): 11.2 (Terminal-Bench 4.0 and AutomationBench)

## Benchmarks

Independent benchmark scores via [Artificial Analysis](https://artificialanalysis.ai) ([view on AA](https://artificialanalysis.ai/models/glm-5-1)). Indices and domain scores are out of 100, Omniscience runs from −100 to 100, Briefcase is an Elo rating, and the other evaluation scores are the share of tasks solved.

- Global rank: #129 of 522 LLMs on the [LLM leaderboard](https://opper.ai/llm-leaderboard)
- Tier: Efficient
- Output speed: 82 tok/s
- Intelligence Index (previous version): 26.1

### Coding

- Terminal-Bench 4.0: 2%
- SciCode: 45%

### Agentic & knowledge work

- AutomationBench: 20%
- GDPval: 31%
- GDP.pdf: 8%
- Briefcase (Elo): 965
- Terminal-Bench Hard: 43%
- τ²-Bench Telecom: 98%

### Science & reasoning

- Humanity's Last Exam: 30%
- GPQA Diamond: 87%
- Long-context reasoning: 74%

### Math & instruction following

- IFBench: 76%

## Get started

Call GLM 5.1 through the Opper gateway with one API key. Opper is drop-in compatible with the OpenAI, Anthropic and Google AI SDKs.

GLM 5.1 is a premium model on Opper. Sign up needs no credit card: you get an API key straight away and the free models work in the playground and the API. Add a card to use premium models, pay-as-you-go with no minimum.

### Set it up with your agent

Paste this into a coding agent like Claude Code, Cursor or Codex and it will wire up Opper for you:

```text
Use curl to download, read and follow: https://skills.opper.ai Call GLM 5.1
```

### Or call it directly

OpenAI:

```javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPPER_API_KEY,
  baseURL: "https://api.opper.ai/v3/compat",
});

const completion = await client.chat.completions.create({
  model: "glm-5.1",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);
```

Anthropic:

```javascript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.OPPER_API_KEY,
  baseURL: "https://api.opper.ai/v3/compat",
});

const message = await client.messages.create({
  model: "glm-5.1",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content);
```

Gemini:

```javascript
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({
  apiKey: process.env.OPPER_API_KEY,
  httpOptions: { baseUrl: "https://api.opper.ai/v3/compat" },
});

const response = await ai.models.generateContent({
  model: "glm-5.1",
  contents: "Hello",
});
console.log(response.text);
```

cURL:

```bash
curl https://api.opper.ai/v3/compat/chat/completions \
  -H "Authorization: Bearer $OPPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.1",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
```

## Use GLM 5.1 in your apps

Pick your tool to see how to run it on GLM 5.1 through Opper.

- [Claude Code](https://opper.ai/apps/claude-code/glm-5-1)
- [Claude Cowork](https://opper.ai/apps/claude-cowork/glm-5-1)
- [Codex](https://opper.ai/apps/codex/glm-5-1)
- [DeepSeek Harness](https://opper.ai/apps/deepseek-harness/glm-5-1)
- [GitHub Copilot CLI](https://opper.ai/apps/github-copilot-cli/glm-5-1)
- [Aider](https://opper.ai/apps/aider/glm-5-1)
- [Goose](https://opper.ai/apps/goose/glm-5-1)
- [Droid](https://opper.ai/apps/droid/glm-5-1)
- [OpenCode](https://opper.ai/apps/opencode/glm-5-1)
- [Pi](https://opper.ai/apps/pi/glm-5-1)
- [OpenClaw](https://opper.ai/apps/openclaw/glm-5-1)
- [Hermes](https://opper.ai/apps/hermes/glm-5-1)
- [Copilot for Obsidian](https://opper.ai/apps/obsidian-copilot/glm-5-1)
- [OmniRoute](https://opper.ai/apps/omniroute/glm-5-1)
- [Cursor](https://opper.ai/apps/cursor/glm-5-1)
- [Cline](https://opper.ai/apps/cline/glm-5-1)
- [Continue](https://opper.ai/apps/continue/glm-5-1)
- [Kilo Code](https://opper.ai/apps/kilo-code/glm-5-1)
- [GitHub Copilot](https://opper.ai/apps/github-copilot/glm-5-1)
- [Zed](https://opper.ai/apps/zed/glm-5-1)
- [JetBrains AI Assistant](https://opper.ai/apps/jetbrains-ai-assistant/glm-5-1)
- [Voidleap Code](https://opper.ai/apps/voidleap-code/glm-5-1)
- [n8n](https://opper.ai/apps/n8n/glm-5-1)
- [LibreChat](https://opper.ai/apps/librechat/glm-5-1)
- [Open WebUI](https://opper.ai/apps/open-webui/glm-5-1)
- [See all apps](https://opper.ai/apps)

## Other models from Z.ai

- [GLM-5.3](https://opper.ai/zhipu/glm-5-3)
- [GLM-5.3-Flash](https://opper.ai/zhipu/glm-5-3-flash)
- [GLM-5.2](https://opper.ai/zhipu/glm-5-2)
- [GLM 5](https://opper.ai/zhipu/glm-5)
- [GLM 4.7](https://opper.ai/zhipu/glm-4-7)
- [GLM 4.6](https://opper.ai/zhipu/glm-4-6)
