z-ai logo
z-ai

Z.ai: GLM 5.1

GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. $0.91 per million input tokens, $2.86 per million output tokens. 204,800 token context window. Higher uptime with 17 providers. Includes independent benchmarks from Artificial Analysis.

Overview

Model specifications

Context
204,800 tokens
Maximum output
128,000 tokens
Architecture
text->text
Tokenizer
Other
Knowledge cutoff
Not provided
Moderated
No
OPENROUTER

Complete pricing

Synchronized OpenRouter rates. Token prices are shown per one million tokens.

Input
$0.91
/M tokens
Output
$2.86
/M tokens
Cache read
$0.169
/M tokens
API

Model configuration

Default parameters

temperature
1
top_p
0.95

Reasoning

Moderated
No
Default parameters
Yes
API

Quick start

Call this exact model ID through OpenRouter’s OpenAI-compatible API.

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"z-ai/glm-5.1","messages":[{"role":"user","content":"Hello!"}]}'
Capabilities

InputOutput

Input
text
Output
text
Reasoning

Yes

API

Supported API parameters

frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_p
Available providers

17 providers

Live providers on OpenRouter

Provider availability, latency, throughput and routing can change continuously. Open the source page for current operational data.

OpenRouter

GMICloud

fp8
Context
203K
Maximum output
182K
Input
$0.910
Output
$2.86
Cache read
$0.169
Cache write
Not provided

StreamLake

fp8
Context
200K
Maximum output
128K
Input
$0.966
Output
$3.04
Cache read
$0.179
Cache write
Not provided

Chutes

fp8
Context
203K
Maximum output
66K
Input
$0.980
Output
$3.08
Cache read
$0.098
Cache write
Not provided

DeepInfra

fp4
Context
203K
Maximum output
66K
Input
$1.05
Output
$3.50
Cache read
$0.205
Cache write
Not provided

SiliconFlow

fp8
Context
205K
Maximum output
131K
Input
$1.19
Output
$3.74
Cache read
$0.600
Cache write
Not provided

Crusoe

fp8
Context
203K
Maximum output
182K
Input
$1.20
Output
$4.40
Cache read
$0.250
Cache write
Not provided

Phala

unknown
Context
203K
Maximum output
128K
Input
$1.21
Output
$4.20
Cache read
$0.600
Cache write
Not provided

AtlasCloud

fp8
Context
203K
Maximum output
182K
Input
$1.26
Output
$3.96
Cache read
$0.234
Cache write
Not provided

DigitalOcean

unknown
Context
164K
Maximum output
147K
Input
$1.30
Output
$4.30
Cache read
$0.260
Cache write
Not provided

Alibaba

fp8
Context
203K
Maximum output
131K
Input
$1.33
Output
$4.18
Cache read
$0.247
Cache write
Not provided

Novita

fp8
Context
205K
Maximum output
131K
Input
$1.38
Output
$4.40
Cache read
$0.260
Cache write
Not provided

Baidu

fp8
Context
203K
Maximum output
131K
Input
$1.40
Output
$4.40
Cache read
$0.260
Cache write
Not provided

Nebius

fp8
Context
203K
Maximum output
182K
Input
$1.40
Output
$4.40
Cache read
Not provided
Cache write
Not provided

Z.AI

fp8
Context
203K
Maximum output
131K
Input
$1.40
Output
$4.40
Cache read
$0.260
Cache write
Not provided

Parasail

fp8
Context
203K
Maximum output
131K
Input
$1.40
Output
$4.40
Cache read
$0.260
Cache write
Not provided

Friendli

unknown
Context
203K
Maximum output
182K
Input
$1.40
Output
$4.40
Cache read
$0.260
Cache write
Not provided

Venice

fp8
Context
200K
Maximum output
80K
Input
$1.54
Output
$4.84
Cache read
$0.286
Cache write
Not provided
z-ai

models

All models