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.6

z-ai/glm-4.6
TextInput: textToolsReasoning205KAdded Sep 30, 2025

Try Z.ai: GLM 4.6 now

Runs on your balance at the prices above. New accounts start with free usage.

One API. Every model.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign in

Session cost $0.00

Z.ai: GLM 4.6 at a glance

  • Input price is 22% higher than the median of 434 Text models.
  • Context window of 204,800 tokens, enough for long documents and multi-turn conversations.
  • Supports tool (function) calling for agents and integrations.
  • Supports structured JSON output with a schema.
  • Supports reasoning effort control.
  • A typical request (1,000 input / 500 output tokens) costs about $0.00578.

About Z.ai: GLM 4.6

Z.ai: GLM 4.6 is a text generation model from Z.ai, released by the provider on 30 September 2025. It sits in the text category and is the successor to GLM-4.5. Compared with that earlier generation, Z.ai describes the main improvement as a longer context window, expanded from 128K to 200K tokens, which lets the model work with more complex inputs.

The model accepts text as input and returns text as output, so it is a straightforward language model with no image or audio handling. Its context window is 204,800 tokens, and the maximum output is 131,072 tokens. The knowledge cutoff is 31 March 2025, meaning the model's built-in knowledge stops at that date. Because the output allowance is large, the model can produce long documents or extended reasoning in a single response rather than being cut off early.

Those capabilities point to a few practical uses. The large context window suits work that involves long inputs: analysing lengthy documents, reviewing large codebases, summarising long reports, or holding extended multi-turn conversations where earlier context still matters. The large maximum output supports tasks that need long-form generation, such as drafting full documents or producing detailed explanations. The model also supports tool calling and structured outputs, which makes it a reasonable fit for agent-style workflows, function calling, and applications that need responses in a defined schema rather than free text.

You call the model through api14's OpenAI-compatible API using the model id "z-ai/glm-4.6". Because the API follows the OpenAI format, you can use the familiar chat completions style of request. The model supports a broad set of request parameters: frequency_penalty, presence_penalty, repetition_penalty, temperature, top_p, top_k, min_p, max_tokens, stop, seed, logit_bias, response_format, structured_outputs, tools, tool_choice, and reasoning, along with include_reasoning for exposing the model's reasoning output. This range gives you control over sampling behaviour, determinism through the seed, output length, and whether the model calls tools or returns structured data.

There are no stated limitations in the facts beyond the text-only input and output and the knowledge cutoff. If your task depends on image or audio input, this model is not the right choice, since it handles text only. If you need knowledge more recent than 31 March 2025, you would need to supply that information in the prompt, because the model's own knowledge does not extend past that date. For text tasks within those bounds, GLM 4.6 offers a large context window, a large output budget, and the parameter set needed for both plain generation and tool-driven workflows.

How to call the Z.ai: GLM 4.6 API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "z-ai/glm-4.6".
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.6",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

frequency_penaltyinclude_reasoninglogit_biasmax_tokensmin_ppresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_p

Specifications

Context length
204,800
Max output
131,072
Input
text
Output
text
Knowledge cutoff
2025-03-31

Requests on api14 · last 7 days

10-1610-1710-1810-1910-2010-2110-22

Z.ai: GLM 4.6: frequently asked questions

How much does the Z.ai: GLM 4.6 API cost?
Z.ai: GLM 4.6 costs Input $1.93 / 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.6?
Z.ai: GLM 4.6 reads up to 204,800 tokens per request: prompt, history and documents together. It writes up to 131,072 output tokens per response.
What can Z.ai: GLM 4.6 do?
Z.ai: GLM 4.6 accepts text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
How do I call Z.ai: GLM 4.6 from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "z-ai/glm-4.6". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Z.ai: GLM 4.6?
Comparable Text models at a similar price: MiniMax: MiniMax M1, OpenAI: o4 Mini (batch), OpenAI: o3 Mini (batch). Each runs through the same API key, so switching is one string.

Z.ai: GLM 4.6 community

New topic

This community has no topics yet. Open the first one about Z.ai: GLM 4.6.