We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
Z.ai: GLM 4.5
z-ai/glm-4.5Try Z.ai: GLM 4.5 now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
Z.ai: GLM 4.5 at a glance
- Input price is 33% higher than the median of 434 Text models.
- Context window of 131,072 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports reasoning effort control.
- A typical request (1,000 input / 500 output tokens) costs about $0.00595.
About Z.ai: GLM 4.5
Z.ai: GLM 4.5 is a text model from Z.ai, released by the provider on 2025-07-25. It is described as Z.ai's latest flagship foundation model, purpose built for agent based applications, and it uses a Mixture of Experts (MoE) architecture. If you are choosing a general purpose text model for an application that needs to plan, call tools and produce long answers, this is the model Z.ai positions at the top of its lineup.
The model takes text as input and returns text as output, so it fits standard chat and completion style workloads. It supports a context length of up to 131072 tokens, which is roughly 128k, and a maximum output of 98304 tokens. Its knowledge cutoff is 2024-12-31, so anything after that date is outside what the model was trained on. The combination of a large context window and a large output budget means you can feed it long documents, transcripts or tool results and still leave room for a substantial response.
Those capabilities point to a few practical uses. Agent style workflows are the clearest fit, since the model was purpose built for them and supports tool calling, which lets it decide when to invoke a function and how to use the result. Long document work is another: summarising, extracting structured data or answering questions over inputs that would not fit in a smaller context. Because it accepts a response format parameter, it can also be used for tasks where you need the output shaped in a particular way, such as JSON for downstream processing. Reasoning support makes it suitable for problems that benefit from step by step thinking before the final answer.
You call the model through api14's OpenAI compatible API using the model id "z-ai/glm-4.5". The request parameters it supports are include_reasoning, max_tokens, reasoning, response_format, temperature, tool_choice, tools, top_k and top_p. In practice that means you can control sampling with temperature, top_p and top_k, cap the response length with max_tokens, enable or inspect reasoning with the reasoning and include_reasoning options, define callable functions with tools and tool_choice, and constrain the output shape with response_format.
One thing to keep in mind is that the model is text only. It does not accept images or audio, so if your input includes those, you need a different model or a preprocessing step. The knowledge cutoff of 2024-12-31 also means it will not know about events after that date unless you supply the information in the prompt. For straightforward, low latency tasks where none of the reasoning or tool features are needed, a smaller model may be a better fit.
How to call the Z.ai: GLM 4.5 API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "z-ai/glm-4.5".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "z-ai/glm-4.5",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
include_reasoningmax_tokensreasoningresponse_formattemperaturetool_choicetoolstop_ktop_pSpecifications
- Context length
- 131,072
- Max output
- 98,304
- Input
- text
- Output
- text
- Knowledge cutoff
- 2024-12-31
Requests on api14 · last 7 days
Z.ai: GLM 4.5: frequently asked questions
- How much does the Z.ai: GLM 4.5 API cost?
- Z.ai: GLM 4.5 costs Input $2.10 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of Z.ai: GLM 4.5?
- Z.ai: GLM 4.5 reads up to 131,072 tokens per request: prompt, history and documents together. It writes up to 98,304 output tokens per response.
- What can Z.ai: GLM 4.5 do?
- Z.ai: GLM 4.5 accepts text and returns text. It supports tool calling, reasoning effort control.
- How do I call Z.ai: GLM 4.5 from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "z-ai/glm-4.5". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to Z.ai: GLM 4.5?
- Comparable Text models at a similar price: Moondream: Moondream 3 Preview, Moondream: Moondream 3.1, Google: Gemini 3.5 Flash Lite. Each runs through the same API key, so switching is one string.
Z.ai: GLM 4.5 community
New topicThis community has no topics yet. Open the first one about Z.ai: GLM 4.5.