# GLM-5.1

> Z.ai's open-weight 754B MoE flagship — SOTA on SWE-Bench Pro and up to ~8 hours of autonomous agentic execution.

- Maker: Z.ai (Zhipu / GLM)
- Line: GLM (flagship)
- Canonical page: https://ai-tldr.dev/models/glm-5-1/
- Updated: 2026-06-18

## In short

GLM-5.1 is the flagship large language model from Z.ai (formerly Zhipu AI), released on April 7, 2026 and open-sourced under the MIT license the following day. It is a ~754B-parameter Mixture-of-Experts model with roughly 40B parameters active per token, a 200K-token context window and up to 128K tokens of output. It has a 200K-token context window and costs $1.40 per million input tokens and $4.40 per million output tokens.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 200K (max output 128K) | [1] |
| Input price | $1.40 / 1M tokens (cached $0.26 / 1M tokens) | [2] |
| Output price | $4.40 / 1M tokens | [2] |
| Licence | MIT · open weights | [1] |
| Released | 7 April 2026 | [3] |
| Parameters | ~754B total, 40B active (MoE) | [1] |

## Sources

1. [zai-org/GLM-5.1 — Hugging Face model card](https://huggingface.co/zai-org/GLM-5.1)
2. [Z.ai pricing](https://docs.z.ai/guides/overview/pricing)
3. [Z.ai introduces GLM-5.1 (754B, SWE-Bench Pro SOTA) — MarkTechPost](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/)

## Overview

GLM-5.1 is the flagship large language model from Z.ai (formerly Zhipu AI), released on April 7, 2026 and open-sourced under the MIT license the following day. It is a ~754B-parameter Mixture-of-Experts model with roughly 40B parameters active per token, a 200K-token context window and up to 128K tokens of output. GLM-5.1 is an iteration on GLM-5 that keeps the same architecture and instead sharpens coding and agentic behaviour through refined reinforcement learning and alignment.

GLM-5.1 is built for long-horizon agentic engineering. Z.ai positions it to work autonomously on a single task for up to roughly 8 hours — planning, executing and iteratively improving its own output — and demonstrated it building a complete Linux desktop environment from scratch across hundreds of iterations. On SWE-Bench Pro it scores 58.4, which Z.ai reports as ahead of GPT-5.4 and Claude Opus 4.6, making GLM-5.1 one of the strongest open-weight coding and agent models at release.

Because the weights ship openly (BF16 and native FP8 checkpoints on Hugging Face under the MIT license), GLM-5.1 can be self-hosted via SGLang, vLLM, Transformers and similar runtimes, or used through Z.ai's hosted API and aggregators such as OpenRouter (model id z-ai/glm-5.1). Note that some Z.ai-reported April 7 benchmark figures were still awaiting full independent verification at release.

## Benchmarks

- SWE-Bench Pro: 58.4% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- AIME 2026: 95.3% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- HMMT Feb. 2026: 82.6% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- GPQA-Diamond: 86.2% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- BrowseComp: 68% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- MCP-Atlas (Public Set): 71.8% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- τ³-Bench: 70.6% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- Terminal-Bench 2.0: 63.5% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- CyberGym: 68.7% ([source](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/))
- Artificial Analysis Intelligence Index: 40index ([source](https://artificialanalysis.ai/models/glm-5-1))

## Pricing

- Input: $1.40 / 1M tokens per 1M tokens
- Cached input: $0.26 / 1M tokens per 1M tokens
- Output: $4.40 / 1M tokens per 1M tokens

Official Z.ai API pricing. Also available via OpenRouter (model id z-ai/glm-5.1) at roughly $0.98 input / $3.08 output per 1M tokens. Open weights (MIT) can be self-hosted at infrastructure cost.

Source: https://docs.z.ai/guides/overview/pricing

## Strengths

- State-of-the-art coding on SWE-Bench Pro (58.4) at release, reported ahead of GPT-5.4 and Claude Opus 4.6
- Long-horizon autonomous execution — sustains a single task for up to ~8 hours across hundreds of iterations
- Open weights under the permissive MIT license, with both BF16 and native FP8 checkpoints for self-hosting
- Strong agentic and tool-use scores (BrowseComp 68.0, MCP-Atlas 71.8, τ³-Bench 70.6)
- Strong math and reasoning (AIME 2026 95.3, GPQA-Diamond 86.2) with thinking mode on by default
- 200K context with up to 128K output, suited to large codebases and long agent traces

## Best for

- Long-running autonomous coding agents that plan, execute and self-correct over many iterations
- Software engineering tasks: bug fixing, refactoring and repository-level changes (SWE-Bench-style work)
- Agentic workflows with tool calling, browsing and MCP-based tool orchestration
- Self-hosted deployment where open weights and a permissive MIT license are required
- Math and STEM reasoning with extended thinking
- Cost-sensitive frontier coding via open weights or competitively priced hosted APIs

## How to access

- [Z.ai](https://docs.z.ai/guides/llm/glm-5.1) — model id `glm-5.1`
- [OpenRouter](https://openrouter.ai/z-ai/glm-5.1) — model id `z-ai/glm-5.1`
- [Hugging Face (weights)](https://huggingface.co/zai-org/GLM-5.1) — model id `zai-org/GLM-5.1`

## GLM (flagship) versions

- [GLM-5.2](https://ai-tldr.dev/models/glm-5-2/) (13 June 2026)
- GLM-5.1 (7 April 2026) — this page
- [GLM-5](https://ai-tldr.dev/models/glm-5/) (11 February 2026)
- [GLM-4.7](https://ai-tldr.dev/models/glm-4-7/) (22 December 2025)
- [GLM-4.6](https://ai-tldr.dev/models/glm-4-6/) (30 September 2025)
- [GLM-4.5](https://ai-tldr.dev/models/glm-4-5/) (28 July 2025)

## FAQ

### Is GLM-5.1 open source?

Yes. Z.ai released GLM-5.1's weights on Hugging Face (zai-org/GLM-5.1) under the permissive MIT license, including both BF16 and native FP8 checkpoints. The MIT license allows you to download, inspect, modify, fine-tune and use the model commercially without restriction.

### How big is GLM-5.1 and what is its context window?

GLM-5.1 is a Mixture-of-Experts model with roughly 754B total parameters and about 40B active per token. It has a 200K-token context window and can generate up to 128K output tokens. (Some trackers list the total as 744B, carried over from GLM-5; the official model card states ~754B.)

### How does GLM-5.1 compare to GPT-5.4 and Claude Opus 4.6 on coding?

On SWE-Bench Pro, Z.ai reports GLM-5.1 scoring 58.4, ahead of GPT-5.4 (57.7) and Claude Opus 4.6 (57.3) — making it state-of-the-art on that benchmark at release. Note that several April 7 figures were self-reported by Z.ai and were still pending full independent verification.

### What is GLM-5.1 best at?

Long-horizon agentic engineering. Z.ai positions it to work autonomously on a single task for up to about 8 hours — planning, executing and iterating — and it posts strong coding, agentic tool-use (BrowseComp, MCP-Atlas, τ³-Bench) and math/reasoning (AIME 2026, GPQA-Diamond) scores.

## Links

- [GLM-5.1 — Z.ai Developer Docs](https://docs.z.ai/guides/llm/glm-5.1)
- [zai-org/GLM-5.1 — Hugging Face model card](https://huggingface.co/zai-org/GLM-5.1)
- [Z.ai pricing](https://docs.z.ai/guides/overview/pricing)
- [GLM 5.1 — OpenRouter API & pricing](https://openrouter.ai/z-ai/glm-5.1)
- [Z.ai introduces GLM-5.1 (754B, SWE-Bench Pro SOTA) — MarkTechPost](https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/)
- [GLM-5.1 intelligence, performance & price — Artificial Analysis](https://artificialanalysis.ai/models/glm-5-1)
- [GLM-5.1 benchmarks, pricing & context window — LLM Stats](https://llm-stats.com/models/glm-5.1)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/glm-5-1/
