GLM 4.5

z-ai/glm-4.5
ToolsJSONReasoning
by Z.ai · 2025-07-25

GLM-4.5 is a text-only language model developed by Z.ai, accessed through OrcaRouter's OpenAI-compatible API. It supports a context window of 128,000 tokens and can generate up to 96,000 tokens per request, making it suitable for long-form text processing and generation tasks. The model is priced at $0.60 per 1 million input tokens and $2.20 per 1 million output tokens, billed at the provider's rate with zero markup by OrcaRouter. On the MATH-500 benchmark, GLM-4.5 achieves a score of 97.9, indicating strong mathematical reasoning capabilities. It is designed for applications that require precise text understanding and generation, particularly in mathematical and logical domains. As a text-only model, it does not support vision or audio inputs. OrcaRouter provides seamless integration through a standard REST API, allowing developers to leverage GLM-4.5 without managing infrastructure.

Max output96K
Inputtext
Outputtext
p50 TTFT6.33 s
Context window128Ktokens
INPUT$0.60/ 1M tokens
OUTPUT$2.20/ 1M tokens
p50 TTFT6.33 s7d
p95 TTFT6.33 s7d
TRAFFIC3.5Ktokens / 7d

Pricing

Pricing
Input / 1M tokens$0.600
Output / 1M tokens$2.20
Cache read / 1M$0.110
CurrencyUSD

Cost calculator

Tokens / month2MM
Input share80%%
Estimated / month $1.84 · With prompt caching $1.45

1.6M input × $0.6/M + 400K output × $2.2/M

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

Estimate based on list price

Per-request examples
ScenarioInput / output tokensPer requestPer 1,000 requests
Chat reply200 / 300$0.0008$0.780
Summarize a long doc30K / 1K$0.020$20.20
Code review8K / 2K$0.0092$9.20

Token & cost estimator

Input tokens: 20Cost per request: $0.001112

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-4.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-4.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 — 128K-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.
  • Solving complex mathematical problems and proofs
  • Generating and explaining code snippets with high accuracy
  • Processing and summarizing long documents (up to 128K tokens)
  • Creating educational content in mathematics, science, and logic
  • Assisting in research tasks that require rigorous reasoning

Performance

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

Benchmarks

OrcaRouter leaderboard
26.3
AA CodingArtificial Analysis Coding Index: one 0–100 score that combines its coding evaluations.
Better than 25% of models compared
#104 of 138
12.8
AA IntelligenceArtificial Analysis Intelligence Index: one 0–100 score that combines its evaluations of reasoning, knowledge, math and coding.
Better than 19% of models compared
#124 of 153
73.7
AA MathArtificial Analysis Math Index: one 0–100 score that combines its competition-math evaluations.
Better than 67% of models compared
#27 of 82
AIMEAIME: problems from the American Invitational Mathematics Examination, a high-school olympiad qualifier.
87.3#6 of 26
AIME 2025AIME: problems from the American Invitational Mathematics Examination, a high-school olympiad qualifier.
73.7#27 of 52
GPQA DiamondGPQA Diamond: graduate-level biology, physics and chemistry questions written to be hard to look up.
78.2#95 of 137
Humanity's Last ExamHumanity's Last Exam: expert-written questions at the frontier of human knowledge, across dozens of subjects.
13.0#109 of 141
IFBenchIFBench: how precisely the model follows new, checkable instructions about the shape of its answer.
44.1#77 of 104
LiveCodeBenchLiveCodeBench: recent competitive-programming problems, published after most models were trained.
73.8#26 of 56
Long-Context RecallLong-Context Recall: answering questions that need facts found and combined across long documents.
52.7#112 of 136
MATH-500MATH-500: 500 competition math problems from the MATH dataset.
97.9#5 of 32
MMLU-ProMMLU-Pro: hard ten-option multiple-choice questions across 14 academic subjects.
83.5#27 of 91
SciCodeSciCode: writing code that solves research-level problems in physics, chemistry, biology and math.
34.8#122 of 141
TerminalBench HardTerminal-Bench: finishing real tasks in a command-line environment, such as building, debugging and configuring software.
22.0#74 of 99
τ²-Benchτ²-Bench: acting as a customer-service agent that uses tools and follows policy while talking to a simulated user.
43.0#88 of 104
Source: artificialanalysis.ai

Human preference and real-world tasks

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

Compare models

GLM 4.5GLM 5.1GLM 5.2GLM 5.3
Input $/M$0.60$1.40$1.40$1.26
Output $/M$2.20$4.40$4.40$3.96
Context128K200K1.0M1.0M
Quality7/109/109/109/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

What is the cost of using GLM-4.5?
GLM-4.5 costs $0.60 per 1M input tokens and $2.20 per 1M output tokens. Billing is at the provider rate with zero markup from OrcaRouter.
What is the context window size of GLM-4.5?
GLM-4.5 supports a context window of 128,000 tokens and can output up to 96,000 tokens per request.
What are the main strengths of GLM-4.5?
Its primary strength is mathematical reasoning, with a MATH-500 score of 97.9. It also offers a large context window and long output capability at competitive pricing.
How does GLM-4.5 compare to other models?
Compared to models with similar context windows, GLM-4.5 has a very high MATH-500 score. Pricing is moderate. It is text-only, so it lacks multimodal support.
Does OrcaRouter store or use my data when I call GLM-4.5?
Data handling policies are determined by OrcaRouter and Z.ai. The provided facts do not specify data retention. Typically, models accessed via API do not use customer data for training unless stated otherwise. Check OrcaRouter's privacy policy for details.
How do I call GLM-4.5 via OrcaRouter's OpenAI-compatible API?
Use the base URL 'https://api.orcarouter.ai/v1', model ID 'z-ai/glm-4.5', and provide your OrcaRouter API key. The API follows OpenAI's chat completion format.
Can I use GLM-4.5 for real-time applications?
Yes, GLM-4.5 supports streaming via the 'stream' parameter, making it suitable for chatbots and live code generation.
What are the limitations of GLM-4.5?
It is text-only (no vision/audio). Its performance on non-mathematical tasks is not documented. The large context window may increase latency. Outputs should be validated for accuracy.

Embed this badge

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

Model card as data

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