Next-generation Zhipu flagship with multiple thinking modes and strong tool calling. 200K context / 128K max output.
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…
GLM 5 supports text input only. According to the provided specifications, it does not accept images, audio, or video. This makes it a pure language model optimized for processing written content. All communication with the model is via text tokens, and the output is also text. If your application requires multimodal input, you would need to use a different model that handles images or other modalities. For tasks like summarizing transcribed audio or extracting text from images, you would need to convert those inputs into text before passing them to GLM 5.
GLM 5 excels in tasks that benefit from its large context window and high output limit. Common use cases include: thoroughly analyzing long legal contracts or regulatory documents; generating detailed summaries of entire research papers or books; maintaining coherent conversation histories in customer support chatbots that span dozens of turns; and performing complex reasoning where the model needs to reference multiple sections of a long prompt. The τ²-Bench score of 98.2 suggests it is particularly strong at executing multi-step tasks in simulated environments, such as navigating websites or performing data entry.
If your task does not require the full 200K context or 128K output, a smaller or cheaper model may be more cost-effective. For example, simple Q&A, short text classification, or single-paragraph generation can be handled by models that cost less per token. GLM 5's pricing is $1.00 per million input tokens and $3.20 per million output tokens, which is higher than many compact models. Additionally, if your workflow involves very short prompts and responses, the latency and cost of setting up a large-context model may not be justified. Evaluate your typical token usage: if you consistently use less than 32K tokens, a smaller model is likely sufficient.
GLM 5 is accessed through OrcaRouter's OpenAI-compatible API, which supports streaming responses and function calling. When using the API, you can set the stream parameter to true to receive tokens incrementally, which reduces perceived latency for long outputs. Function calling allows the model to request tool invocations or structured data output. These capabilities are standard for the API but depend on the specific model's support. Based on the provided information, GLM 5 can be used with these features. For implementation details, refer to the OrcaRouter API documentation.
τ²-Bench is a benchmark that evaluates an AI agent's ability to complete multi-step tasks in a simulated environment. The score represents the success rate across a diverse set of tasks, such as web navigation, form filling, and information retrieval. A score of 98.2 means GLM 5 completed 98.2% of the benchmark tasks successfully. This is a very high performance, indicating that the model can follow complex instructions and execute sequences of actions reliably. It does not guarantee perfect real-world performance, but it suggests strong agentic capabilities for similar types of structured tasks.
Latency for GLM 5 depends on input and output length, as well as the underlying infrastructure provided by Z.ai. OrcaRouter routes to the provider's backend and does not add additional latency beyond network overhead. For short inputs and outputs (e.g., 1,000 tokens in, 500 tokens out), response times may be in the range of a few seconds. For long generations near the 128K maximum, latency can be significantly higher—often tens of seconds or more—because the model must process and generate many tokens. Streaming can mitigate perceived wait times. No specific latency figures are provided, so actual performance should be tested with representative workloads.
The primary strength highlighted by the headline benchmark is GLM 5's high success rate on agentic tasks. The τ²-Bench score of 98.2 suggests it can handle multi-step reasoning and tool use effectively. Additionally, its large context window (200K tokens) and max output (128K tokens) mean it can maintain coherence over very long texts, which is a meaningful improvement over models with smaller windows. No other benchmark scores are provided, so direct comparisons on tasks like language understanding or math are not available from this data. The model likely benefits from Z.ai's training methodology and increased scale.
GLM 5 is a text-only model, so it cannot process images or other modalities. Its performance on tasks requiring multimodal understanding is zero. The τ²-Bench score, while high, is measured in a simulated environment; real-world agentic performance may vary. The model's cost per token is relatively high ($1.00 input / $3.20 output per million tokens), so for long contexts the total cost can accumulate quickly. No information is provided about latency under load, so you should benchmark with your specific use case. Also, like all language models, GLM 5 may produce incorrect or hallucinated content, especially in complex reasoning scenarios beyond its training distribution.
GLM 5 is priced at $1.00 per 1 million input tokens and $3.20 per 1 million output tokens. These are the provider rates set by Z.ai. OrcaRouter passes through these rates with zero additional markup, so you pay exactly the provider price. Tokens are counted using the standard tokenization method (approximately 0.75 words per token for English). Input tokens include the prompt and any system messages; output tokens are the model's generated response. There are no separate charges for API calls or special features unless specified by the provider. Pricing is per-token, so cost scales linearly with usage.
Because GLM 5 charges by token, total cost depends on both prompt length and generation length. For a typical interaction with 10,000 input tokens and 5,000 output tokens, the cost would be (10,000/1,000,000)*$1.00 + (5,000/1,000,000)*$3.20 = $0.01 + $0.016 = $0.026 per call. For tasks using the full context, like 200,000 input tokens and 128,000 output tokens, the cost would be $0.20 + $0.4096 = $0.6096 per call. If your use case does not require such extremes, a cheaper model with smaller context may be more economical. OrcaRouter allows you to compare costs across models before deployment.
The provided information does not mention caching or volume discounts for GLM 5 through OrcaRouter. Pricing is billed per token at the standard provider rate. If you require cost savings for high-volume usage, consider whether a different model or a dedicated deployment might be beneficial. OrcaRouter's zero-markup policy means you pay the same price as if you called Z.ai directly, without any platform fee. For specific discount arrangements, you would need to negotiate with Z.ai or check for any promotions. As standard, caching is not described, so assume each inference is charged individually.
To use GLM 5, send requests to OrcaRouter's OpenAI-compatible API endpoint. Set the base URL to https://api.orcarouter.ai/v1. In your request body, specify the model ID as "z-ai/glm-5". You can use any OpenAI SDK or any HTTP client that supports the chat completions endpoint. Example using Python: import openai; client = openai.OpenAI(base_url="https://api.orcarouter.ai/v1", api_key="your_key"); client.chat.completions.create(model="z-ai/glm-5", messages=[{"role":"user","content":"Hello"}]). Support for streaming, function calling, and other parameters mirrors the OpenAI schema.
GLM 5 supports all standard parameters of the OpenAI chat completions format. You can set temperature (0-2), top_p, max_tokens (up to 128,000), stop sequences, frequency_penalty, presence_penalty, stream (boolean), and tools/functions for function calling. The context window limit is 200,000 tokens total, which includes both messages and any system prompt. If the input exceeds this, you must truncate or split the context. OrcaRouter does not automatically truncate; the request will fail if token count exceeds the limit. Use the tokenizer's count to ensure compliance.
Migrating to OrcaRouter involves changing the base URL and model ID. If you previously used an OpenAI endpoint with model "gpt-4o", you would replace the base URL with https://api.orcarouter.ai/v1 and set model to "z-ai/glm-5". No other code changes are needed if you are already using the OpenAI chat completions format. Ensure your API key is valid for OrcaRouter. Test with a small request to verify connectivity and that the model responds as expected. Note that token counting may differ slightly due to model-specific tokenizers, but the API handles it transparently.
If the combined token count of your input (system messages, conversation history, user prompt) exceeds 200,000 tokens, the API will return an error indicating the context length is exceeded. You must reduce the input size. Similarly, if you set max_tokens above 128,000, the request will be capped at the model's maximum output; the API will either reject the parameter or clamp it to the limit. It is best to check token counts programmatically before sending large payloads. OrcaRouter does not automatically truncate prompts, so you must manage context length yourself.
GLM 5's context window of 200,000 tokens and max output of 128,000 tokens are among the largest available. This compares favorably to many closed-source models that offer 128K or 32K contexts. Its τ²-Bench score of 98.2 is high, suggesting strong agentic performance. However, pricing is higher than some alternative providers; for example, a model with similar token capacity but lower per-token cost may be more economical for heavy use. GLM 5 is text-only, while some competitors support multimodal inputs. Without other benchmark data from the provided facts, direct quality comparisons on NLP tasks are not possible.
You might choose GLM 5 if you need a larger context window than OpenAI's standard models (which are typically 128K tokens). GLM 5 offers 200K context and 128K output, which can accommodate longer inputs without truncation. Additionally, the τ²-Bench score of 98.2 may be higher than some OpenAI models on agentic benchmarks, though exact comparisons depend on evaluation conditions. If cost is a primary concern, compare per-token prices; GLM 5 at $1.00/$3.20 per million tokens may be competitive depending on the alternative. Also, if you prefer to use a Z.ai model for specific performance characteristics, GLM 5 is a choice.
Compared to earlier GLM models (like GLM 4), GLM 5 increases the context window from 128K to 200K tokens and max output from 64K to 128K tokens. The τ²-Bench score of 98.2 is likely an improvement, though older model scores are not provided. Pricing may have changed; older models may be cheaper per token. If your tasks fit within the smaller context of an older model, using a lower-cost model could be more economical. However, for tasks requiring the full 200K context or higher output, GLM 5 is the only option in the series. Upgrading may also bring quality improvements in reasoning and instruction following.
Based on the provided information, GLM 5 achieves a τ²-Bench score of 98.2, which is near-perfect on that benchmark. This suggests it is very strong for agentic tasks similar to those in the benchmark. However, benchmark scores do not guarantee real-world performance, and other models may perform differently in your specific environment. If your agentic tasks closely match the τ²-Bench scenario, GLM 5 is an excellent candidate. But if your tasks involve different tools, languages, or constraints, you should test multiple models. OrcaRouter allows you to easily switch between models to compare results.
OpenAI-compatible — keep the SDK you already use
https://api.orcarouter.ai/v1from 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",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)do_sampleinclude_reasoningmax_tokensreasoningrequest_idresponse_formatstopstreamtemperaturethinkingtool_choicetool_streamtoolstop_puser_id| Input / 1M tokens | $1.00 |
| Output / 1M tokens | $3.20 |
| Cache read / 1M | $0.260 |
| Currency | USD |
Estimate based on list price
Estimate only — actual token counts depend on the provider's tokenizer.
@misc{orcarouter_glm_5,
title = {GLM 5 API},
author = {Z.ai},
year = {2026},
howpublished = {OrcaRouter},
url = {https://www.orcarouter.ai/models/z-ai/glm-5}
}Z.ai. (2026). GLM 5 API. OrcaRouter. https://www.orcarouter.ai/models/z-ai/glm-5