Z.AI logo

GLM 5.2

Z.aiReleased Jun 16, 2026z-ai/glm-5.2
CostCompare

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

Context
1.05M
Max output
1M
Input /1M
$0.56$0.75
Output /1M
$1.80$2.40
Blended /1M
$0.87$1.16
AcceptsTextProducesTextTokenizer Other

Launch offer · up to 25% off on 1 of 7 providers

Applied automatically; prices return to list when each offer ends.

Price schedule by provider

DiscountedList price

DeepInfra$0.75 / $2.40
-25% · ongoing
Alibaba$1.40 / $4.40
List price · no offer
BytePlus$1.40 / $4.40
List price · no offer
Telnyx$1.00 / $4.00
List price · no offer
Baseten$1.40 / $4.40
List price · no offer
Together AI$1.40 / $4.40
List price · no offer
Z.AI$1.40 / $4.40
List price · no offer
Today · Nov 6Nov 20
Price after offer (in/out)

Providers

7 providers serve this model. FastRouter routes each request to the best available one, and you can bring your own key for any of them.

Pricing tier
DeepInfra logo
DeepInfraCheapest
deepinfra
Input /1M$0.75$0.56
Output /1M$2.40$1.80
Context1.05M
Max output1M
Latency—
Throughput—
Offer
-25%Ongoing
Supports tool callingSupports reasoning
TE
Telnyx
telnyx
Input /1M$1.00
Output /1M$4.00
Context1.05M
Max output131K
Latency—
Throughput—
Offer—
Supports tool callingSupports reasoning
Alibaba logo
Alibaba
alibaba
Input /1M$1.40
Output /1M$4.40
Context1.05M
Max output131K
Latency—
Throughput—
Offer—
Supports tool callingSupports reasoning
BytePlus logo
BytePlus
byteplus
Input /1M$1.40
Output /1M$4.40
Context1.05M
Max output131K
Latency—
Throughput—
Offer—
Supports tool callingSupports reasoning
Baseten logo
Baseten
baseten
Input /1M$1.40
Output /1M$4.40
Context1.05M
Max output131K
Latency—
Throughput—
Offer—
Supports tool callingSupports reasoning
Together AI logo
Together AIFP4
together
Input /1M$1.40
Output /1M$4.40
Context1.05M
Max output131K
Latency—
Throughput—
Offer—
Supports tool callingSupports reasoning
Z.AI logo
Z.AI
z-ai
Input /1M$1.40
Output /1M$4.40
Context1.05M
Max output131K
Latency—
Throughput—
Offer—
Supports tool callingSupports reasoning

Offers without an end date apply until further notice. Discounts apply per tier, so switch tiers to see their offers.

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.
max_completion_tokens
Maximum tokens in the completion.

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.

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.2", # 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 5z-ai/glm-5

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.

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