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 Latest

~z-ai/glm-latest
TextInput: textToolsReasoning1MAdded Aug 19, 2026

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

  • Input price is 82% lower than the median of 434 Text models.
  • Context window of 1,048,576 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.00273.

About Z.ai: GLM Latest

Z.ai: GLM Latest is a text model from Z.ai, published under the model id ~z-ai/glm-latest. The name reflects how the endpoint behaves: it always redirects to the latest GLM model from Z.ai, so you are not pinning a specific version but pointing at whatever the current GLM release is. That makes it a reasonable default when you want the newest GLM behaviour without tracking version numbers yourself, though it also means the underlying model can change over time.

The model takes text in and returns text out. It has a context window of 1,048,576 tokens and a maximum output of 943,718 tokens, so both very long inputs and very long generations are possible within those bounds. It supports reasoning, which you can steer with the reasoning and reasoning_effort parameters, and it can report reasoning content when you set include_reasoning. Structured outputs and response_format are supported, as are tools, tool_choice and parallel_tool_calls, so function calling and schema-constrained generation are both available.

Those capabilities point to a few practical uses. The large context suits long document work: summarising, extracting structured data from, or answering questions over lengthy files and codebases in a single request. Tool calling and structured outputs fit agent-style workflows and pipelines where the model must return machine-readable results or invoke external functions. Reasoning support helps on tasks that benefit from step-by-step analysis, and the large output ceiling is useful when you need a long generated artefact rather than a short answer.

You call it through api14's OpenAI-compatible API using the model id ~z-ai/glm-latest, so existing OpenAI SDKs and clients work with a change of base URL and model name. The request parameters it accepts are frequency_penalty, include_reasoning, logit_bias, logprobs, max_tokens, min_p, parallel_tool_calls, presence_penalty, reasoning, reasoning_effort, repetition_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_k, top_logprobs and top_p. Sampling controls, penalties, seeding, stop sequences, log probabilities and tool configuration are therefore all available to tune behaviour per request.

One thing to keep in mind is that the endpoint tracks the latest GLM model rather than a fixed version, so behaviour can shift when Z.ai updates it; if you need reproducible outputs across time, a pinned model may suit you better. Input and output are text only, so image or audio work would need a different model. Within those bounds, the combination of a very large context, large output limit, reasoning controls and tool support covers a wide range of text workloads.

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

Supported parameters

frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_pparallel_tool_callspresence_penaltyreasoningreasoning_effortrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_p

Specifications

Context length
1,048,576
Max output
943,718
Input
text
Output
text

Requests on api14 · last 7 days

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

Z.ai: GLM Latest: frequently asked questions

How much does the Z.ai: GLM Latest API cost?
Z.ai: GLM Latest costs Input $0.28 / 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 Latest?
Z.ai: GLM Latest reads up to 1,048,576 tokens per request: prompt, history and documents together. It writes up to 943,718 output tokens per response.
What can Z.ai: GLM Latest do?
Z.ai: GLM Latest accepts text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
How do I call Z.ai: GLM Latest from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "~z-ai/glm-latest". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Z.ai: GLM Latest?
Comparable Text models at a similar price: DeepSeek: DeepSeek V4.1 Flash, Meta: Muse Glimmer 30B, Meituan: LongCat 2.0. Each runs through the same API key, so switching is one string.

Z.ai: GLM Latest community

New topic

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