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 Flash

z-ai/glm-4.7-flash
TextInput: textToolsReasoning200KAdded Jan 19, 2026

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

  • Input price is 87% lower than the median of 434 Text models.
  • Context window of 200,000 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.000912.

About Z.ai: GLM 4.7 Flash

GLM 4.7 Flash is a text generation model from Z.ai, released by the provider on 19 January 2026. Z.ai describes it as a 30B-class SOTA model that offers a new option balancing performance and efficiency, and notes that it is further optimized for agentic coding use cases, with strengthened coding capabilities and long-horizon task planning. It sits in the text category, so it is aimed at language tasks rather than image, audio or video work.

The model accepts text input and returns text output. It has a context window of 200,000 tokens, which is large enough to hold substantial source files, documentation sets or long conversation histories in a single request. The maximum output is 117,964 tokens, so responses can run well beyond a short answer when the task calls for it. Because the provider highlights agentic coding and long-horizon planning, the model is positioned for work where it must reason across many steps rather than produce a single isolated reply.

Those characteristics suggest a few practical uses. Agentic coding is the clearest fit: reading a codebase, planning a sequence of edits and carrying that plan across a long session. Long-horizon task planning follows from the same strengths, for example breaking a multi-stage job into ordered steps and tracking progress. The large context window also suits document analysis, summarisation of long inputs, and tool-driven workflows where the model calls functions and incorporates their results. Structured outputs and reasoning controls make it usable in pipelines that need predictable response shapes rather than free-form prose.

You call the model through api14's OpenAI-compatible API using the model id "z-ai/glm-4.7-flash". Because the interface follows the OpenAI format, existing OpenAI client libraries and request shapes work with a change of base URL and model id. The model supports a broad set of request parameters: temperature, top_p, top_k, min_p, frequency_penalty, presence_penalty, repetition_penalty, max_tokens, stop, seed, logit_bias, logprobs, top_logprobs, response_format, structured_outputs, tools, tool_choice, reasoning and include_reasoning. That combination covers sampling control, deterministic runs via seed, token-level inspection through logprobs, and tool or structured output workflows.

One limit worth noting is modality: input and output are text only, so tasks involving images or audio need a different model. The 200,000 token context and 117,964 token output ceiling are generous but finite, so extremely large inputs still need chunking or retrieval. If your workload does not involve coding, planning or tool use, a simpler text model may be sufficient, but within its stated scope GLM 4.7 Flash is built for exactly these agentic and long-context jobs.

How to call the Z.ai: GLM 4.7 Flash 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-flash".
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-flash",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_p

Specifications

Context length
200,000
Max output
117,964
Input
text
Output
text

Requests on api14 · last 7 days

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

Z.ai: GLM 4.7 Flash: frequently asked questions

How much does the Z.ai: GLM 4.7 Flash API cost?
Z.ai: GLM 4.7 Flash costs Input $0.21 / 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 Flash?
Z.ai: GLM 4.7 Flash reads up to 200,000 tokens per request: prompt, history and documents together. It writes up to 117,964 output tokens per response.
What can Z.ai: GLM 4.7 Flash do?
Z.ai: GLM 4.7 Flash accepts text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
How do I call Z.ai: GLM 4.7 Flash from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "z-ai/glm-4.7-flash". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Z.ai: GLM 4.7 Flash?
Comparable Text models at a similar price: OpenAI: GPT-5 Nano, Inception: Mercury 3, Google: Gemma 3 27B. Each runs through the same API key, so switching is one string.

Z.ai: GLM 4.7 Flash community

New topic

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