20% off all GPT ๐ŸŽ‰ 30% off DeepSeekLearn more

Z.ai: GLM 5.1

Chat
z-ai/glm-5.1

GLM 5.1 is Z.ai's GLM-series chat model released on 2026-03-27, a newer iteration of the line aimed at general-purpose and agentic workloads. It supports reasoning, function calling (tool use), prompt caching, and web search, covering agentic loops that mix tool calls with retrieval. Context: 200K tokens, output: 128K. Available via OpenAI and Anthropic protocols through Ofox.

Context Window
200K
Max Output Tokens
128K
Released
2026-03-27
Capabilities
Function CallingReasoningPrompt CachingWeb Search
Available Providers
Z.aiAliyunAlibaba Cloud
Supported Protocols
openaianthropic

Providers

Alibaba Cloudprovider.type: "alicloud"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions
anthropic
Aliyunprovider.type: "aliyun"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Cache Write
$1.5/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions
anthropic
Z.aiprovider.type: "zai"
Input Tokens
$1.4/M
Output Tokens
$4.4/M
Cache Read
$0.26/M
Web Search
$0.01/R
Protocols
openai/v1/chat/completions
anthropic

Code Examples

from openai import OpenAI
client = OpenAI(
base_url="https://api.ofox.ai/v1",
api_key="YOUR_OFOX_API_KEY",
)
response = client.chat.completions.create(
model="z-ai/glm-5.1",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(response.choices[0].message.content)

Uptime & Status

Benchmarks

LMArena โ†—Evaluated as glm-5.1

Z.ai: GLM 5.1 scores 1472 in the Overall category of the LMArena text leaderboard (style control), ranking #25 of 374 models based on 27,322 human preference votes (updated 2026-07-12).

Benchmark scores for glm-5.1 on LMArena
CategoryArena Score95% CIRankVotes
Overall14721467โ€“1477#25 of 37427,322
Hard Prompts14941488โ€“1500#22 of 37418,029
Coding15221514โ€“1529#17 of 3697,638
Math14791463โ€“1495#18 of 3621,432
Creative Writing14541445โ€“1464#19 of 3724,644
Instruction Following14651458โ€“1472#21 of 3749,253
Chinese15181502โ€“1534#18 of 3441,561

Source: LMArena ยท CC BY 4.0 ยท Updated 2026-07-12 ยท Methodology โ†— ยท Ranks compare models within each category of the LMArena text leaderboard (style control). Scores come from third-party human preference evaluations, not from OFOX.

Frequently Asked Questions

Z.ai: GLM 5.1 on Ofox.ai costs $1.4/M per million input tokens and $4.4/M per million output tokens. Pay-as-you-go, no monthly fees.