Skip to content

GLM 5.1

GLM 5.1 advances Z.ai's GLM-5 generation with a focus on long-horizon autonomous coding. It can work independently on a single task for over eight hours, planning, executing, and iterating until it delivers engineering-grade results.

ReasoningTool UseImplicit Caching
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'zai/glm-5.1',
prompt: 'Why is the sky blue?'
})

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Z.ai
203K
3.3s
55tps
$1.40/M$4.40/M
Read:$0.26/M
Write:
+1
04/07/2026
Fireworks
202K
1.1s
70tps
$1.40/M$4.40/M
Read:$0.26/M
Write:
+3
04/07/2026
DeepInfra
203K
1.5s
32tps
$1.40/M$4.40/M
Read:$0.26/M
Write:
+3
04/07/2026
Novita AI
205K
2.5s
58tps
$1.40/M$4.40/M
Read:$0.26/M
Write:
+3
04/07/2026
Baseten
202K
0.4s
120tps
$1.30/M$4.30/M
Read:$0.26/M
Write:
+3
04/07/2026
Together AI
202K
0.5s
221tps
$1.40/M$4.40/M
+3
04/07/2026