# GLM-5.1

> GLM-5.1 is Z-AI's open-weight flagship foundation model for long-horizon autonomous tasks. It has a 128K output window and scores 58.4 on SWE-Bench Pro. It supports thinking mode, function calling, and MCP integration.

**ID**: `z-ai/glm-5.1`  
**Creator**: Zhipu AI  
**Category**: text  
**Context**: 128K tokens  
**Pricing**: $0.90 / $2.90 per 1M · billed by your provider (BYOK)  
**Released**: 2026-06-01  
**Links**: [Weights on Hugging Face](https://huggingface.co/zai-org/GLM-5.1) · [Announcement](https://z.ai/blog/glm-5.1) · [Paper](https://arxiv.org/abs/2602.15763) · [AnyRouter release](https://anyrouter.dev/blog/releases/2026-06-08-catalog)  
**Web page**: https://anyrouter.dev/model/z-ai/glm-5.1

**Input modalities**: text  
**Output modalities**: text  

**Tokenizer**: GLM

**Capabilities**: chat, reasoning, streaming, function-calling, thinking

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/chat/completions`

```bash
curl https://anyrouter.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "z-ai/glm-5.1",
  "messages": [
    {
      "role": "user",
      "content": "Say hi in 3 words."
    }
  ]
}'
```

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| aihubmix-byok | $1.40/M (list) | $4.40/M (list) |
| z-ai-byok | $1.40/M (list) | $4.40/M (list) |
| deepinfra-byok | $1.40/M (list) | $4.40/M (list) |
| openrouter-byok | $1.40/M (list) | $4.40/M (list) |
| Z-AI Coding Plan | $1.40/M (list) | $4.40/M (list) |
| ollama-byok | $1.40/M (list) | $4.40/M (list) |
| opencode-zen-byok | $1.40/M (list) | $4.40/M (list) |
| opencode-go-byok | $1.40/M (list) | $4.40/M (list) |
| siliconflow-byok | $1.40/M (list) | $4.40/M (list) |
| commandcode-byok | $1.40/M (list) | $4.40/M (list) |
| vercel-byok | $1.40/M (list) | $4.40/M (list) |
| novita-byok | $1.38/M (list) | $4.40/M (list) |
| huggingface-byok | $1.40/M (list) | $4.40/M (list) |
| nousresearch-byok | $1.40/M (list) | $4.40/M (list) |
| tokenharbor-byok | $1.40/M (list) | $4.40/M (list) |
| computrix-byok | $0.86/M (list) | $3.43/M (list) |
| infron-byok | $0.49/M (list) | $1.98/M (list) |
| zenmux-byok | $0.88/M (list) | $3.51/M (list) |
| requesty-byok | $1.40/M (list) | $4.40/M (list) |
| phala-byok | $1.21/M (list) | $4.20/M (list) |
| llmgateway-byok | $1.38/M (list) | $4.40/M (list) |
| orcarouter-byok | $1.40/M (list) | $4.40/M (list) |
| opengateway-byok | $1.26/M (list) | $3.96/M (list) |
| aimlapi-byok | $1.40/M (list) | $4.40/M (list) |
| chutes-byok | $0.90/M (list) | $2.90/M (list) |
| nano-gpt-byok | $1.40/M (list) | $4.40/M (list) |
| edenai-byok | $1.40/M (list) | $4.40/M (list) |
| ofox-byok | $1.40/M (list) | $4.40/M (list) |
| hilinkup-byok | $1.40/M (list) | $4.40/M (list) |
| fluence-byok | $0.67/M (list) | $2.54/M (list) |
| cortecs-byok | $1.40/M (list) | $4.40/M (list) |
| qiniu-byok | $1.40/M (list) | $4.40/M (list) |
| jiekou-byok | $1.40/M (list) | $4.40/M (list) |

BYOK routes are billed by your own provider key — AnyRouter charges $0. Rates marked (list) are the provider's published list price.

## Benchmarks

- **GPQA Diamond**: 0.8
- **HLE**: 0.3
- **τ²-Bench Telecom**: 1.0
- **SciCode**: 0.4
- **OTIS Mock AIME**: 0.9
- **SimpleQA (verified)**: 0.4

Benchmark data from [Epoch AI](https://epoch.ai/benchmarks) (CC-BY 4.0).

## Model card

- License: MIT, open weights (https://huggingface.co/zai-org/GLM-5.1) [1]

### Links

- announcement: https://z.ai/blog/glm-5.1
- model card: https://huggingface.co/zai-org/GLM-5.1
- paper: https://arxiv.org/abs/2602.15763

### Sources

1. [GLM-5.1 model card](https://huggingface.co/zai-org/GLM-5.1) (accessed 2026-11-11)
2. [GLM-5.1 blog](https://z.ai/blog/glm-5.1) (accessed 2026-11-11)
