Z.ai
GLM-5.3-FlashX
Total Context
1M
Max Output
131.1K
Released
N/A
glm-5.2GLM-5.2 is Z.ai’s flagship foundation model for long-horizon engineering tasks, agent workflows, and complex reasoning. Its usable 1M-token context window supports project-scale codebases, system documentation, and sustained multi-step execution. Use the GLM API through TokenHub to evaluate current pricing, available endpoints, context limits, and benchmark results for workflows spanning requirements analysis, repository understanding, implementation, testing, and deployment.
Context Window
1M tokens
Maximum Output
131.1K tokens
Release Date
Jun 13, 2026
Modalities
| Input Price | Output Price | Cache Read |
|---|---|---|
| $1.1429/M | $4/M | $0.2857/M |
Reasoning
Tool calling
Temperature parameter
Attachments
Knowledge Base
Endpoint Protocols
GLM-5.2 is an open-weight text model designed for million-token context, long-horizon coding agents and stable delivery of complex software projects.
Maintains useful performance across a one-million-token context so complete projects and extended task histories can remain in one reasoning chain.
Sustains project decomposition, architecture design, implementation, testing, repair and deployment across extended autonomous workflows.
Improved frontend, backend, mobile and deep-debugging capabilities help it follow engineering constraints across complete application workflows.
GLM-5.2 suits end-to-end application delivery, repository-scale engineering and long-running research or optimization tasks.
Turn product requirements into architecture, frontend and backend code, tests, fixes and deployment-ready application artifacts.
Keep an extensive project in context, trace dependencies and implement coordinated changes without losing established engineering constraints.
Run extended cycles of analysis, implementation, measurement and correction for performance engineering or automated research.
import OpenAI from "openai"
const client = new OpenAI({
apiKey: process.env.TOKENHUB_API_KEY,
baseURL: "https://us-api.tokenhub.com/v1",
})
const result = await client.chat.completions.create({})
console.log(result.choices[0]?.message?.content)| Index score | ||
|---|---|---|
| Artificial Analysis Intelligence Index | Artificial Analysis broad capability aggregate | 51.1 |
| Artificial Analysis Coding Index | Artificial Analysis software task aggregate | 68.8 |
| Knowledge & Reasoning | ||
| GPQA | Advanced science problem solving | 89.5% |
| HLE | Broad expert-level exam set | 40.1% |
| Coding & Engineering | ||
| SciCode | Scientific coding challenges | 50.5% |
| Terminal-Bench Hard | Hard terminal task execution | 50.8% |
| Instruction Following & Agent Tasks | ||
| IFBench | Prompt constraint adherence | 73.3% |
| AA-LCR | Long-context reasoning | 71.3% |
| τ²-Bench | Agent workflow tasks | 99.1% |
Metrics sourced from Artificial Analysis
Answers to common questions about the GLM-5.2 API, Z.ai pricing, coding and agent workflows, context limits, and model comparisons on TokenHub.
GLM-5.2 is a Z.ai model designed for long-horizon engineering tasks, complex reasoning, and agent workflows. It is intended for work such as understanding a codebase, planning changes, writing code, testing, and continuing a multi-step task with substantial project context.
GLM-5.2 is a strong candidate when a task requires repository-scale context, repeated tool use, or sustained planning across several steps. Before production use, validate its benchmark results, endpoint support, latency, and tool-calling behavior against your own coding or agent workload.
Create a TokenHub API key, copy the exact GLM-5.2 model ID shown on this page, and select a supported endpoint in the API section. Use the generated request example as the starting point for your OpenAI-compatible or other supported client integration.
Review the current input, output, and cache-read prices displayed on this page, then estimate cost using your typical prompt size, response length, request volume, and cache-hit rate. Long-context and agent workflows can have a very different cost profile from short chat requests.
Check the context length and maximum output values in the model specifications on this page. These limits should be evaluated together: a large context window helps with repositories and documentation, while maximum output determines how much the model can return in one response.
Start with the workload. Evaluate GLM-5.2 for long-running engineering and agent tasks; evaluate DeepSeek V4 Flash when its current price, output limit, and supported endpoints better fit high-throughput text generation or retrieval workflows. Use the comparison page to verify the live specifications before deciding.
There is no universal winner. Compare the two models against the actual task: coding and agent reliability, reasoning quality, context and output limits, pricing, and endpoint compatibility. Run a small evaluation with representative prompts before standardizing a production workflow on either GLM-5.2 or Qwen3.8 Max.
Use one API key to access GLM-5.2 and more AI models through TokenHub.
Media and Discussions
Selected public videos and posts related to this model.
X (Twitter)
Z.ai ·
Introducing GLM-5.2: Frontier Intelligence, Open Weights - Significant improvements in coding and agentic tasks - Strong long-horizon capabilities with a 1M context window - Two levels of reasoning effort: GLM-5.2 (max) pushes the limits, while GLM-5.2 (high) strikes a strong https://t.co/SjGPSVhePJ
https://pbs.twimg.com/media/HK84LPRXQAA6x0_.jpgView originaljietang ·
GLM-5.2 is Fully Open, Frontier Intelligence Belongs to Everyone Today, the sudden restriction of certain frontier models is deeply regrettable. At a time when access to frontier models is abruptly cut off for non-technical reasons, we are even more convinced of one thing:
View originalZ.ai ·
Intelligence should be open, accessible, and ready to build with, empowering every developer, everywhere. GLM-5.2 is now available to all GLM Coding Plan users, including Lite, Pro, Max, and Team plans. https://t.co/aOKcqZD5EJ As our new flagship model, GLM-5.2 delivers
View originalReddit
GLM-5.2 is a win for local AI
View originalGLM-5.2 benchmarked on DeepSWE: Beats Gemini & GPT-5.4, but the token volume/cost makes it wildly inefficient? (Theo - t3.gg)
klippers ·
Read full post
Saw this breakdown from Theo (t3.gg) on X showing the latest DeepSWE leaderboard stats for the new GLM-5.2 open-weight model.The good news: it's officially surpassing GPT-5.4 and the entire Gemini lineup in raw coding capability. Seeing an open-weight model punch that high is incredibly dope.The catch? It is not cheap to run.According to the chart:GPT-5.5 (medium) and Claude Opus 4.8 (high) are both cheaper and smarter on an average cost-per-task basis.GLM-5.2 is sitting far lower on the efficiency curve despite its open-weight status.Theo points out a massive caveat in the replies: GLM-5.2 apparently uses way more output tokens. So even if the baseline token cost looks cheap on paper, the sheer volume of tokens required to complete a task drives the total cost way up.
Gave GLM-5.2 and Opus 4.8 the same one-shot prompt for a playable Backrooms game, here's how they did
Fun_Walk_4965 ·
View originalYouTube
GLM-5.2 (Fully Tested): I got EARLY ACCESS & This MODEL is CRAZY!
AICodeKing
View originalCan China's new AI model GLM-5.2 rival Anthropic, OpenAI platforms? | The World | ABC News
ABC News (Australia)
View originalGLM 5.2 is my new favorite model...
Better Stack
View original