GLM 5

z-ai/glm-5
ToolsJSONReasoning
by Z.ai · 2026-02-11

Next-generation Zhipu flagship with multiple thinking modes and strong tool calling. 200K context / 128K max output.

ctx200K tokens
Max output128K
Inputtext
Outputtext
p50 TTFT1.65 s
INPUT$1.00/ 1M tokens
OUTPUT$3.20/ 1M tokens
p50 TTFT1.65 s7d
p95 TTFT5.00 s7d
TRAFFIC9.5Ktokens / 7d

GLM 5 is a text model developed by Z.ai, accessible through OrcaRouter's OpenAI-compatible API. It accepts text inputs and offers a context window of 200,000 tokens with a maximum output of 128,000…

What is Z.ai's GLM 5?

Who should use GLM 5?

How does GLM 5 fit into Z.ai's lineup?

Code samples

Call from any SDK

OpenAI-compatible — keep the SDK you already use

  • OpenAI SDKhttps://api.orcarouter.ai/v1
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key=os.environ["ORCAROUTER_API_KEY"],
)

response = client.chat.completions.create(
    model="z-ai/glm-5",
    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

Pricing
Input / 1M tokens$1.00
Output / 1M tokens$3.20
Cache read / 1M$0.260
CurrencyUSD

Cost calculator

Tokens / month10MM
Input share70%%
Estimated / month $16.60 · With prompt caching $14.01

Estimate based on list price

Token & cost estimator

Input tokens: 20Cost per request: $0.001620

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

Performance

p50 TTFT
1.65 s
Output speed
547 tok/s
p95 TTFT
5.00 s
Error rate
0%

Public benchmarks

44.2
AA Coding
Better than 46% of models compared
#75 of 138
27.9
AA Intelligence
Better than 55% of models compared
#66 of 147
GPQA Diamond
82.0
Humanity's Last Exam
29.3
IFBench
72.3
Long-Context Recall
75.7
SciCode
46.2
TerminalBench Hard
43.2
τ²-Bench
98.2
Source: artificialanalysis.ai

Community buzz

What developers are saying this week

Hacker News8 mentions · 7dup 4 vs the previous week

How it compares

GLM 5GLM 5.1GLM 5.2GLM 5.3
Input $/M$1.00$1.40$1.40$1.26
Output $/M$3.20$4.40$4.40$3.96
Context200K200K1.0M1.0M
Quality8/109/109/109/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

What is the cost to use GLM 5 through OrcaRouter?
GLM 5 is priced at $1.00 per 1 million input tokens and $3.20 per 1 million output tokens. OrcaRouter bills at provider rate with zero markup, so you pay exactly that amount.
What is the context window size of GLM 5?
GLM 5 has a context window of 200,000 tokens. This includes all input tokens (system prompt, conversation history, user prompt). Max output is 128,000 tokens.
What are GLM 5's strengths?
Its strengths include a very large context window (200K tokens), high output limit (128K tokens), and a top τ²-Bench score of 98.2, indicating strong performance on agentic tasks.
How does GLM 5 compare to GPT-4o?
Comparisons depend on specific metrics. GLM 5 offers a larger context window (200K vs GPT-4o's 128K). Its τ²-Bench score of 98.2 may be higher than GPT-4o on that benchmark. However, GPT-4o supports multimodal inputs (images, audio) while GLM 5 is text-only. Pricing also differs; check current rates for both.
Does OrcaRouter store or use my data when calling GLM 5?
OrcaRouter's data handling policies are separate. As a gateway, it passes requests to Z.ai. You should review Z.ai's privacy policy for their data usage. OrcaRouter typically does not log prompt content unless explicitly stated; consult OrcaRouter's documentation for details.
How do I call GLM 5 using an OpenAI-compatible API?
Set the base URL to https://api.orcarouter.ai/v1 and use model ID "z-ai/glm-5". You can use any OpenAI SDK; just point it to OrcaRouter's endpoint. Example: openai.OpenAI(base_url="https://api.orcarouter.ai/v1", api_key="your_key"). Then create a chat completion with the model parameter.
Is there a rate limit for GLM 5 on OrcaRouter?
Rate limits depend on your OrcaRouter plan and account tier. Check your OrcaRouter dashboard for details. There is no model-specific rate limit from Z.ai enforced through OrcaRouter beyond standard infrastructure constraints.
Can I use streaming with GLM 5?
Yes, GLM 5 supports streaming via the OpenAI-compatible API. Set stream=True in your request to receive tokens incrementally. This works with OrcaRouter's endpoint.
What happens if my input exceeds 200,000 tokens?
The API will return an error indicating the context length is exceeded. You must reduce input size. OrcaRouter does not truncate automatically.
Does GLM 5 support function calling?
Yes, the OpenAI-compatible API supports function calling (tools). GLM 5 can be used with function definitions, though performance depends on the model. OrcaRouter passes these parameters through to the provider.

Embed this badge

Z.ai: GLM 5•$1.00/M in•1650ms p50•via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/z-ai/glm-5" target="_blank"> <img src="https://www.orcarouter.ai/embed/z-ai/glm-5.svg" alt="Z.ai: GLM 5 on OrcaRouter" /> </a>
Markdown [![Z.ai: GLM 5](https://www.orcarouter.ai/embed/z-ai/glm-5.svg)](https://www.orcarouter.ai/models/z-ai/glm-5)

Model card as data

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