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

z-ai/glm-4.7
TextInput: textToolsReasoning205KAdded Dec 22, 2025

Try Z.ai: GLM 4.7 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.7 at a glance

  • Input price is 20% 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.00535.

About Z.ai: GLM 4.7

GLM 4.7 is Z.ai's latest flagship text model, released on 22 December 2025. Z.ai builds the GLM family, and this version concentrates its upgrades in two areas: programming capability and more stable multi-step reasoning and execution. The provider also reports improvements on complex agent tasks, which places the model in the class of general purpose assistants that are expected to plan, call tools and carry a task through several steps rather than answer a single question.

The model is text in and text out. It does not accept images, audio or other non-text inputs, and it returns text only. Its context window is 204,800 tokens, and the maximum output length is 131,072 tokens. That combination matters for long jobs: a large repository, a long conversation history or a big pile of documents can sit in the prompt, and the reply itself can be long enough to hold substantial generated content, such as a large file or a full report, without being cut short.

Because of the reasoning and agent focus, the natural uses are code generation, refactoring and review across large files, multi-step tool use where the model has to call functions and act on results, and analysis that requires holding a lot of material in view at once. Structured outputs and JSON response formats make it usable as the reasoning step inside a pipeline, and the large context helps when the task depends on details buried far from the start of the document.

Through api14 you call it with the model id "z-ai/glm-4.7" on the OpenAI-compatible API, so an existing OpenAI client usually works after you point the base URL at api14 and swap the model name. Request parameters supported are frequency_penalty, include_reasoning, logit_bias, max_tokens, min_p, presence_penalty, reasoning, repetition_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_a, top_k and top_p. The tool and reasoning related parameters are worth noting: tools and tool_choice drive function calling, reasoning and include_reasoning control whether reasoning output is returned, and response_format plus structured_outputs constrain the shape of the reply. Seed is available for reproducible sampling, and the standard sampling controls (temperature, top_p, top_k, min_p, top_a, the two penalties and repetition_penalty) let you tune randomness and repetition.

Since the model is text only, tasks involving images, audio or video need a different model.

How to call the Z.ai: GLM 4.7 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.7".
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.7",
  "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_atop_ktop_p

Specifications

Context length
204,800
Max output
131,072
Input
text
Output
text

Requests on api14 · last 7 days

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

Z.ai: GLM 4.7: frequently asked questions

How much does the Z.ai: GLM 4.7 API cost?
Z.ai: GLM 4.7 costs Input $1.89 / 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.7?
Z.ai: GLM 4.7 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.7 do?
Z.ai: GLM 4.7 accepts text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
How do I call Z.ai: GLM 4.7 from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "z-ai/glm-4.7". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Z.ai: GLM 4.7?
Comparable Text models at a similar price: Z.ai: GLM 5.3 (batch), Qwen: Qwen3.5-27B, OpenAI: GPT-5.4 Mini (batch). Each runs through the same API key, so switching is one string.

Z.ai: GLM 4.7 community

New topic

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