Models / Z.ai / GLM 5.2
Z.ai

GLM 5.2

BYOKOpen weightsReleased 13 Jun 2026

Open-weight model from Z.ai with a very large context window. It stands out on coding, ranking near the top on SWE-bench Verified, while its overall intelligence score sits mid-table.

Read the full description ↓

Spec sheet

Family
Z.ai
Released
13 Jun 20265 months ago
Weights
Open
Context window
1M tokens
Largest response
131k tokens
Accepts
text
Supports
tools, reasoning, structured output
Knowledge cutoff
–
Intelligence index
60.4#52
Input price
$0.93 / 1M
Output price
$3 / 1M
Blended price (3:1)
$1.45 / 1M
Index points per $
41.7#53
Speed
70.5 tokens/sec#85
Popularity
#23 of 194by usage
Providers
8
Weights on
zai-org/GLM-5.2

Benchmarks

Score · rank among models tested

The tick on each bar marks the registry median; hover over a bar for the numbers. Sources and how the index is computed: methodology.

Providers and prices

$ per 1M tokens · from genai-prices
ProviderGatewayPydantic AI model stringInputCached inputOutputBlended
Z.aiBYOKzai:GLM-5.2 $1.4$0.26$4.4$2.15
Doublewordgateway/doubleword:zai-org/GLM-5.2-FP8 $0.93$0.19$3$1.45
Zhipu AIBYOK–$1.1$0.28$3.86$1.79
BasetenBYOK–$1.4$0.14$4.4$2.15
Cloudflare Workers AIBYOK–$1.4$0.26$4.4$2.15
NovitaBYOK–$1.4$0.26$4.4$2.15
OpenRouterBYOKopenrouter:z-ai/glm-5.2 $1.4$0.26$4.4$2.15
Together AIBYOKtogether:zai-org/GLM-5.2 $1.4$0.26$4.4$2.15

The cheapest provider is highlighted. Blended price assumes three input tokens for each output token.

Example code

# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/doubleword:zai-org/GLM-5.2-FP8', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)

Ask GLM 5.2 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

Compare

GLM 5.2vsGPT-5.2
Intelligence index
205590$0.1$1$10GPT-5.2: 60.3 at $4.81 blendedGLM 5.2: 60.4 at $1.45 blended
GPQA Diamond
5075100$0.1$1$10GPT-5.2: 91.4% at $4.81 blendedGLM 5.2: 91.9% at $1.45 blended
OTIS Mock AIME
4070100$0.1$1$10GPT-5.2: 96.1% at $4.81 blendedGLM 5.2: 86.4% at $1.45 blended
FrontierMath
1055100$0.1$1$10GPT-5.2: 67.4% at $4.81 blendedGLM 5.2: 59.2% at $1.45 blended
ARC-AGI-2
050100$0.1$1$10GPT-5.2: 52.9% at $4.81 blendedGLM 5.2: 22.8% at $1.45 blended
SimpleQA Verified
1055100$0.1$1$10GPT-5.2: 37.1% at $4.81 blendedGLM 5.2: 34.2% at $1.45 blended
SWE-bench Verified
507090$0.1$1$10GPT-5.2: 73.8% at $4.81 blendedGLM 5.2: 78.7% at $1.45 blended
Terminal-Bench
04590$0.1$1$10GPT-5.2: 64.9% at $4.81 blended
SciCode
204570$0.1$1$10GLM 5.2: 51.2% at $1.45 blended
WebDev Arena
122015251830$0.1$1$10GPT-5.2: 1480 at $4.81 blendedGLM 5.2: 1593.2 at $1.45 blended
APEX-Agents
04590$0.1$1$10GLM 5.2: 45.2% at $1.45 blended
LMArena text
128014101540$0.1$1$10GPT-5.2: 1416.3 at $4.81 blendedGLM 5.2: 1469.5 at $1.45 blended
Epoch Capabilities Index
120150180$0.1$1$10GPT-5.2: 154.5 at $4.81 blendedGLM 5.2: 153.1 at $1.45 blended

Score against blended price per 1M tokens (log scale). GLM 5.2   GPT-5.2   other models

Intelligence indexOur composite of the benchmarks below, 0-100
GLM 5.260.4
GPT-5.260.3
GPQA DiamondGraduate-level science questions, multiple choice
GLM 5.291.9%
GPT-5.291.4%
OTIS Mock AIMECompetition mathematics problems with exact answers
GLM 5.286.4%
GPT-5.296.1%
FrontierMathOriginal research-level mathematics problems, tiers 1 to 3
GLM 5.259.2%
GPT-5.267.4%
ARC-AGI-2Abstract visual puzzles that test learning a new rule from a few examples
GLM 5.222.8%
GPT-5.252.9%
SimpleQA VerifiedShort factual questions answered from memory, without search
GLM 5.234.2%
GPT-5.237.1%
SWE-bench VerifiedReal GitHub issues resolved, run by Epoch with one fixed scaffold
GLM 5.278.7%
GPT-5.273.8%
Terminal-BenchTasks completed in a terminal; the best result of any agent using the model
GLM 5.2–
GPT-5.264.9%
SciCodeScientific programming problems written by researchers
GLM 5.251.2%
GPT-5.2–
WebDev ArenaRating from human votes on web apps the models built
GLM 5.21593.2
GPT-5.21480
APEX-AgentsLong professional tasks (banking, consulting, law) passed on the first attempt
GLM 5.245.2%
GPT-5.2–
LMArena textRating from blind human votes between pairs of chat responses
GLM 5.21469.5
GPT-5.21416.3
Epoch Capabilities IndexEpoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index
GLM 5.2153.1
GPT-5.2154.5
Input pricePer 1M tokens, lower is better
GLM 5.2$0.93
GPT-5.2$1.75
Output pricePer 1M tokens, lower is better
GLM 5.2$3
GPT-5.2$14
EfficiencyIndex points per blended $
GLM 5.242
GPT-5.213
SpeedOutput tokens per second
GLM 5.270.5 t/s
GPT-5.255 t/s
Context windowTokens
GLM 5.21M
GPT-5.2400k
Model stringFor Pydantic AI
GLM 5.2gateway/doubleword:zai-org/GLM-5.2-FP8
GPT-5.2gateway/openai:gpt-5.2

About GLM 5.2

Description written by an LLM from the data on this page

Open-weight model from Z.ai with a very large context window. It stands out on coding, ranking near the top on SWE-bench Verified, while its overall intelligence score sits mid-table.

GLM 5.2 is an open-weight text model from Z.ai, released in June 2026. It supports tool calling, reasoning mode and structured output, with a 1M-token context window and responses up to 131k tokens. Coding is its clearest result: 78.7% on SWE-bench Verified places it third of 23 models tested.

Its overall picture is middling. The Intelligence index of 60.4 sits just above the registry median of 59.5, ranked 55th of 114. It is above median on GPQA Diamond and LMArena text, but below median on ARC-AGI-2, SimpleQA Verified and OTIS Mock AIME, where it scores 86.4% against a median of 94.2%.

Input costs $0.93 per million tokens and output $3, giving a blended rate of $1.45 against a median of $1.01. It delivers 41.7 intelligence points per dollar, 53rd of 194, and is served by eight providers.

Strengths

  • 78.7% on SWE-bench Verified, 3rd of 23 models tested
  • 91.9% on GPQA Diamond, 29th of 94, above the 89.8% median
  • 1593 WebDev Arena rating, 21st of 85
  • 1M-token context window, responses up to 131k tokens

Weaknesses

  • 22.8% on ARC-AGI-2, 50th of 68, far below the 61.3% median
  • 34.2% on SimpleQA Verified, 57th of 76
  • Blended price of $1.45 per million tokens, above the $1.01 median

Best for

Coding agents and tool-calling workflows that need a very large context window or open weights.

One key, every model

Pydantic AI Gateway gives you the models marked with a single API key, spending limits and Logfire tracing. Bring your own key for the rest.

Start free  Read the docs