GLM 5

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

Z.ai's GLM 5 is a text-processing model designed for large-context tasks. It supports a context window of up to 200,000 tokens and can generate up to 128,000 tokens per request. The model is priced at $1.00 per 1 million input tokens and $3.20 per 1 million output tokens, billed at provider rate with zero markup through OrcaRouter. A headline benchmark score of 98.2 on τ²-Bench indicates strong performance on agentic task completion. GLM 5 accepts only text inputs and is accessed via OrcaRouter's OpenAI-compatible API. This model suits users who need to process lengthy documents, maintain coherent context over long conversations, or generate extended outputs. Its token capacity makes it practical for legal document analysis, academic research, and large-scale summarization. Because pricing is deterministic per token, cost scales linearly with usage. OrcaRouter provides the infrastructure to call GLM 5 using the same endpoints and parameter patterns as other OpenAI-compatible models, simplifying migration and testing.

Max output128K
Inputtext
Outputtext
p50 TTFT1.75 s
Data retentionZero Data Retention available. With ZDR on, requests go only to providers with a zero-retention agreement.
Context window200Ktokens
INPUT$1.00/ 1M tokens
OUTPUT$3.20/ 1M tokens
p50 TTFT1.75 s7d
p95 TTFT10.00 s7d
TRAFFIC32.4Mtokens / 7d

Pricing

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

Cost calculator

Tokens / month2MM
Input share80%%
Estimated / month $2.88 · With prompt caching $2.29

1.6M input × $1/M + 400K output × $3.2/M

Prompt caching assumes half of the input tokens are read from cache at $0.26/M.

Estimate based on list price

Per-request examples
ScenarioInput / output tokensPer requestPer 1,000 requests
Chat reply200 / 300$0.0012$1.16
Summarize a long doc30K / 1K$0.033$33.20
Code review8K / 2K$0.014$14.40

Token & cost estimator

Input tokens: 20Cost per request: $0.001620

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

Code samples

Use an OpenAI-compatible SDK or send an HTTP request. Get API key

API key
export ORCAROUTER_API_KEY=…
Base URL
https://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)

Example response

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "created": 1763280000,
  "model": "z-ai/glm-5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 10,
    "total_tokens": 19
  }
}
  • choices[0].message.content — the model's answer.
  • finish_reason — "stop" means the answer is complete; "length" means it was cut off at max_tokens.
  • usage — the input and output tokens this call is billed for.

An HTTP 200 with finish_reason "stop" means the call succeeded.

Supported parameters

ParameterWhat it does
max_tokensUpper limit on the number of tokens the model generates.
temperatureSampling randomness: lower is more focused, higher is more varied.
toolsFunctions the model may call, described as JSON Schema.
response_formatForce JSON output, optionally matching a JSON Schema.
top_pNucleus sampling: only consider tokens within this cumulative probability.

Full API reference

Use cases and examples

  • Long context — 200K-token context window: whole codebases, long reports or chat histories in one request.
  • Agents and tool use — Calls the functions you define, for agents and tool workflows.
  • Structured extraction — Returns JSON that follows your schema, for pulling fields out of text.
  • Reasoning — Works through a problem before answering: math, science and multi-step tasks.
  • Long-document analysis and extraction (e.g., contracts, research papers)
  • Extended conversation agents that retain context across thousands of messages
  • Large-scale summarization of multi-page reports or transcripts
  • Complex reasoning tasks requiring both broad context and precise output generation

Performance

p50 TTFTTime to first token for a typical request: half of requests got their first token faster than this.
1.75 s
#38 fastest of 144 models
Output speedHow many tokens per second the model streams once it starts answering.
67.5 tok/s
#116 fastest of 137 models
p95 TTFTTime to first token for a slow request: 95% of requests got their first token faster than this.
≥ 10 s
Error rateShare of requests to this model on OrcaRouter that ended in an error over the window.
0.70%

Benchmarks

OrcaRouter leaderboard
44.2
AA CodingArtificial Analysis Coding Index: one 0–100 score that combines its coding evaluations.
Better than 46% of models compared
#75 of 138
27.9
AA IntelligenceArtificial Analysis Intelligence Index: one 0–100 score that combines its evaluations of reasoning, knowledge, math and coding.
Better than 59% of models compared
#62 of 153
GPQA DiamondGPQA Diamond: graduate-level biology, physics and chemistry questions written to be hard to look up.
82.0#86 of 137
Humanity's Last ExamHumanity's Last Exam: expert-written questions at the frontier of human knowledge, across dozens of subjects.
29.3#68 of 141
IFBenchIFBench: how precisely the model follows new, checkable instructions about the shape of its answer.
72.3#49 of 104
Long-Context RecallLong-Context Recall: answering questions that need facts found and combined across long documents.
75.7#78 of 136
SciCodeSciCode: writing code that solves research-level problems in physics, chemistry, biology and math.
46.2#74 of 141
TerminalBench HardTerminal-Bench: finishing real tasks in a command-line environment, such as building, debugging and configuring software.
43.2#32 of 99
τ²-Benchτ²-Bench: acting as a customer-service agent that uses tools and follows policy while talking to a simulated user.
98.2#3 of 104
Source: artificialanalysis.ai

Human preference and real-world tasks

1,446
LMArena TextLMArena Text: an Elo rating from blind votes by people comparing two models' answers side by side.
#64 on LMArena
72.8%
SWE-bench VerifiedSWE-bench Verified: the share of real GitHub issues, checked by human annotators, that the model resolves.
#6 of 29
Source: lmarena.ai, swebench.com

Community buzz

What developers are saying this week

Hacker News4 mentions · 7dup 2 vs the previous week

Compare models

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•1751ms 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