GLM 5.1

z-ai/glm-5.1
FlagshipFeatured
ToolsJSONReasoning
by Z.ai · 2026-04-07

Z.ai's strongest coding-and-agent model in the GLM-5 line; supports streaming tool calls and deep thinking. 200K context.

ctx200K tokens
Max output128K
Inputtext
Outputtext
p50 TTFT6.60 s
INPUT$1.40/ 1M tokens
OUTPUT$4.40/ 1M tokens
p50 TTFT6.60 s7d
p95 TTFT10.00 s7d
TRAFFIC8.1Mtokens / 7d

GLM 5.1 is a flagship language model from Z.ai, accessible through OrcaRouter's OpenAI-compatible API. It is designed for tasks that require handling very large context windows – up to 200,000 tokens…

What is GLM 5.1?

Who is GLM 5.1 designed for?

What are the core specifications?

How is GLM 5.1 accessed?

Code samples

Call from any SDK

OpenAI-compatible — keep the SDK you already use

  • OpenAI SDKhttps://api.orcarouter.ai/v1
from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key="$ORCAROUTER_API_KEY",
)

response = client.chat.completions.create(
    model="z-ai/glm-5.1",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Supported parameters

  • do_sample
  • include_reasoning
  • max_tokens
  • reasoning
  • request_id
  • response_format
  • stop
  • stream
  • temperature
  • thinking
  • tool_choice
  • tool_stream
  • tools
  • top_p
  • user_id

Pricing

Input / 1M tokens$1.40
Output / 1M tokens$4.40
Cache read / 1M$0.260
CurrencyUSD

Cost calculator

Tokens / month10MM
Input share70%%
Estimated / month $23.00 · With prompt caching $19.01

Estimate based on list price

Token & cost estimator

Input tokens: 20Cost per request: $0.002228

Estimate only — actual token counts depend on the provider's tokenizer.

Performance

p50 TTFT
6.60 s
Output speed
90.6 tok/s
p95 TTFT
10.00 s
Error rate
0%

Public benchmarks

53.7
AA Coding
Better than 75% of models compared
#27 of 106
55.7
AA Intelligence
Better than 76% of models compared
#26 of 110
57.7
AA Math
Better than 35% of models compared
#53 of 81
GPQA Diamond
47.7 index
Humanity's Last Exam
28.0
IFBench
76.3
Long-Context Recall
62.3
MMLU-Pro
64.7 index
SciCode
43.8
TerminalBench Hard
43.2
τ²-Bench
46.7 index
Source: artificialanalysis.ai

How it compares

GLM 5.1GLM 5.2GLM 5GLM 4.5
Input $/M$1.40$1.40$1.00$0.60
Output $/M$4.40$4.40$3.20$2.20
Context200K1.0M200K128K
Quality9/109/108/107/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

How is GLM 5.1 priced on OrcaRouter?
GLM 5.1 is priced at $1.40 per 1 million input tokens and $4.40 per 1 million output tokens. These rates are set by Z.ai and passed through by OrcaRouter with zero markup.
What is the context window size of GLM 5.1?
GLM 5.1 supports a context window of 200,000 tokens and can generate up to 128,000 tokens in a single response.
What are the main strengths of GLM 5.1?
Its main strengths are its large context window, high output limit, and strong performance on tool-use planning tasks as measured by a τ²-Bench score of 97.7.
How does GLM 5.1 compare to other flagship models?
GLM 5.1 has one of the largest context windows and output limits among flagship models, and a top τ²-Bench score. However, it is text-only, while some competing models support multimodal inputs. Pricing is competitive but varies.
Does OrcaRouter handle my data when using GLM 5.1?
Data handling is subject to OrcaRouter's privacy policy. Z.ai, the model provider, may have additional data processing terms. You should review both policies to understand how your data is used and stored.
How do I call GLM 5.1 using the OpenAI SDK?
Set your base URL to https://api.orcarouter.ai/v1, use the model ID "z-ai/glm-5.1", and pass your OrcaRouter API key. All standard OpenAI chat completion parameters are supported.
Can I use GLM 5.1 for free or with a trial?
OrcaRouter may offer limited free credits or a trial period, but the model itself is pay-per-token. No free tier specific to GLM 5.1 has been announced.
What tasks should I avoid using GLM 5.1 for?
Avoid using GLM 5.1 for simple tasks where a cheaper model suffices (e.g., short translations, classification), and for multimodal tasks requiring image or audio input, as GLM 5.1 is text-only.

Embed this badge

Z.ai: GLM 5.1$1.40/M in6598ms p50via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/z-ai/glm-5.1" target="_blank"> <img src="https://www.orcarouter.ai/embed/z-ai/glm-5.1.svg" alt="Z.ai: GLM 5.1 on OrcaRouter" /> </a>
Markdown [![Z.ai: GLM 5.1](https://www.orcarouter.ai/embed/z-ai/glm-5.1.svg)](https://www.orcarouter.ai/models/z-ai/glm-5.1)

Model card as data

GET /api/public/models/z-ai/glm-5.1Open
Machine-readable:/llms.txt/llms-full.txt