Z.AI logo

GLM 5

Z.aiReleased Feb 11, 2026z-ai/glm-5
Compare

GLM-5 is Z.ai’s flagship open-source foundation model, built for complex system design and long-horizon agent workflows. Aimed at expert developers, it delivers production-grade results on large-scale programming tasks and competes with top closed-source models. With strong agentic planning, deep backend reasoning, and iterative self-correction, GLM-5 goes beyond code generation to help design, build, and execute complete systems end-to-end.

Context
205K
Max output
131K
Input /1M
$0.30
Output /1M
$2.55
Blended /1M
$0.86
AcceptsTextProducesTextTokenizer Other

Providers

FastRouter routes your requests to this provider. You can also bring your own key.

DeepInfra logo
DeepInfra
deepinfra
Input /1M$0.60
Output /1M$2.08
Context205K
Max output131K
Latency—
Throughput—
Supports tool callingSupports structured (JSON) outputSupports reasoning

Supported parameters

Request parameters you can send with this model.

Core (Sampling & basic generation)

max_tokens
Maximum tokens to generate.
min_p
Minimum probability threshold for sampling.
seed
Seed for deterministic sampling.
stop
Sequences where generation stops.
temperature
Controls randomness of output.
top_k
Limits sampling to top K tokens.
top_p
Nucleus sampling threshold.

Penalties (Token Penalties)

frequency_penalty
Penalizes frequent tokens.
presence_penalty
Penalizes tokens already present.
repetition_penalty
Penalizes repeated tokens.

Reasoning (Reasoning Controls)

include_reasoning
Include reasoning trace in the response.
reasoning
Provider-specific reasoning configuration.

Tool Use (Function Calls & Tools)

tool_choice
How the model should use tools.
tools
Tool/function definitions available to the model.

Output & Format (Response Formatting)

logit_bias
Bias values for specific token IDs.

Performance

Median throughput and time to first token per provider over the last week.

Throughput

Latency

Make your first API call

OpenAI-compatible. Point your SDK at FastRouter, or call the API directly.

Full API docs
Replace <FASTROUTER_API_KEY> with your key · Get your key →Install
OpenAI SDKHTTP
from openai import OpenAI
client = OpenAI(
base_url="https://api.fastrouter.ai/api/v1", # FastRouter base URL
api_key= "<FASTROUTER_API_KEY>", # Replace with your FastRouter API key
)
completion = client.chat.completions.create(
model="z-ai/glm-5", # Replace with your model ID
messages=[
{ "role": "user", "content": "What is the meaning of life?" }
]
)
print(completion.choices[0].message.content)

Frequently asked questions

More models from Z.AI

Z.AI logo
GLM 4.6z-ai/glm-4.6

GLM-4.6 is the latest iteration in the GLM series by Zhipu AI, designed as a large language model with about 355 billion parameters in a Mixture of Experts (MoE) architecture. It is optimized for various complex tasks including real-world coding, long-context processing, advanced reasoning, intelligent agent applications, and refined writing. The model features an expanded context window of 200,000 tokens (up from 128,000 in GLM-4.5), allowing it to handle longer and more complex interactions such as extensive documents or multi-turn conversations.

Z.AI logo
GLM 4.7z-ai/glm-4.7

GLM-4.7 is Z.AI’s latest flagship model, featuring upgrades in two key areas: enhanced programming capabilities and more stable multi-step reasoning/execution. It demonstrates significant improvements in executing complex agent tasks while delivering more natural conversational experiences and superior front-end aesthetics.

Z.AI logo
GLM 5.1z-ai/glm-5.1

zai-org/GLM-5.1 is Z.AI's (formerly Zhipu AI) open-weight, instruction-tuned coding flagship model—a refreshed upgrade over GLM-5—excelling in agentic engineering, complex system programming, and long-horizon tasks with SOTA open-source performance approaching Claude Opus 4.6.

Z.AI logo
GLM 5.2z-ai/glm-5.2

GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-level software engineering,...

Z.AI logo
GLM-5.3z-ai/glm-5.3

GLM-5.3 is Z.ai’s latest GLM-5-series flagship, a 743B-parameter text-only foundation model post-trained from GLM-5.2 for frontier-level coding, long-horizon agentic workflows, and defensive cybersecurity analysis. It inherits GLM-5’s 200K-token context window and up to 128K-token outputs, supports advanced reasoning and tool use, and is initially exposed through Z.ai’s coding plan and forthcoming API access.

Z.AI logo
GLM-Imagez-ai/glm-image

GLM-Image is Z.AI's text-to-image generation model that quickly and accurately understands text descriptions to produce precise, personalized, high-quality images. It supports an 'hd' mode for more detailed and consistent output (~20s generation time) and a 'standard' mode optimized for faster generation (~5-10s), along with flexible custom resolutions from 1024px to 2048px per side.

Model scores sourced from ArtificialAnalysis