---
title: "GLM 5.3 Flash"
description: "A low-cost open-weights model from Z.ai with a very large context window, accepting text, image and video input. Its intelligence score sits above the registry median."
canonical: https://pydantic.dev/models/list/glm-5.3-flash/
---

# GLM 5.3 Flash

> A low-cost open-weights model from Z.ai with a very large context window, accepting text, image and video input. Its intelligence score sits above the registry median.
>
> Markdown copy of https://pydantic.dev/models/list/glm-5.3-flash/. Index for agents: https://pydantic.dev/models/llms.txt

**Agents: use the API for model information.** It answers a question in one request, where the pages need several.

- Choose a model for an agent: `POST https://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/api/ask?query=<question>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of all but the single model. An `OPTIONS` request to any endpoint returns its schema. The same five are tools of the MCP server at `https://pydantic.dev/models/mcp`. More: https://pydantic.dev/models/usage.md

Use it with Pydantic AI as `gateway/doubleword:zai-org/GLM-5.3-Flash`.

## Spec sheet

- **Family:** Z.ai
- **Released:** 26 Aug 2026
- **Weights:** open
- **Context window:** 1,000,000 tokens
- **Largest response:** 131,072 tokens
- **Accepts:** text, image, video
- **Tool calling:** yes
- **Knowledge cutoff:** unknown
- **Intelligence index:** 62.5 (rank 39)
- **Scores updated:** 2026-11-30
- **Price:** $0.15 input, $0.5 output, $0.24 blended per 1M tokens
- **Index points per $:** 263.2 (rank 8)
- **Speed:** 86.5 tokens/sec (rank 55)
- **Popularity:** rank 2 of 194 by usage
- **Pydantic AI Gateway:** built in

## Benchmarks

### Pydantic AI benchmarks

Our own benchmarks, each about 10 tasks run once with tool calling and once in code mode (https://pydantic.dev/models/codemode.md). Not part of the intelligence index. Cost is the mean cost of one task. For the combined score, code mode is compared over the four benchmarks run in both modes.

| Benchmark                                                                                      | Tool calling | Code mode | Change | Cost per task | Cost per task, code mode | Rank     | Runs                                                                |
| ---------------------------------------------------------------------------------------------- | ------------ | --------- | ------ | ------------- | ------------------------ | -------- | ------------------------------------------------------------------- |
| [Pydantic AI Combined](https://pydantic.dev/models/benchmarks/pydantic_ai.md)                  | 59.9%        | 56.6%     | +1.7   | $0.054        | $0.069                   | 29 of 44 | https://pydantic.dev/models/list/glm-5.3-flash/pydantic_ai.md       |
| [Pydantic AI - Billing ops](https://pydantic.dev/models/benchmarks/billing_ops.md)             | 70%          | 70%       | ±0     | $0.10         | $0.018                   | 21 of 44 | https://pydantic.dev/models/list/glm-5.3-flash/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 60%          | 40%       | −20    | $0.0049       | $0.011                   | 3 of 44  | https://pydantic.dev/models/list/glm-5.3-flash/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 0%           | 20%       | +20    | $0.072        | $0.11                    | 38 of 44 | https://pydantic.dev/models/list/glm-5.3-flash/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 89.6%        | 96.3%     | +6.7   | $0.13         | $0.14                    | 9 of 44  | https://pydantic.dev/models/list/glm-5.3-flash/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 60%          | –         | –      | $0.0070       | –                        | 35 of 44 | https://pydantic.dev/models/list/glm-5.3-flash/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 80%          | –         | –      | $0.0022       | –                        | 9 of 44  | https://pydantic.dev/models/list/glm-5.3-flash/llm_judge.md         |
| [Pydantic AI - Cyber Willing](https://pydantic.dev/models/benchmarks/cyber_willing.md)         | 97.2%        | –         | –      | $0.012        | –                        | 5 of 32  | https://pydantic.dev/models/list/glm-5.3-flash/cyber_willing.md     |

### Other benchmarks


| Benchmark                | Score  | Rank among models tested | What it measures                                                                                 | Source                                    |
| ------------------------ | ------ | ------------------------ | ------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| Intelligence index       | 62.5   | 39                       | Our composite of the benchmarks below, 0-100                                                     | Pydantic, from the sources credited below |
| GPQA Diamond             | 90.2%  | 42                       | Graduate-level science questions, multiple choice                                                | Epoch AI (CC BY 4.0)                      |
| OTIS Mock AIME           | 93.9%  | 46                       | Competition mathematics problems with exact answers                                              | Epoch AI (CC BY 4.0)                      |
| FrontierMath             | 55.8%  | 48                       | Original research-level mathematics problems, tiers 1 to 3                                       | Epoch AI (CC BY 4.0)                      |
| ARC-AGI-2                | 65.8%  | 31                       | Abstract visual puzzles that test learning a new rule from a few examples                        | ARC Prize, via Epoch AI (CC BY 4.0)       |
| SciCode                  | 51.6%  | 44                       | Scientific programming problems written by researchers                                           | SciCode, via Epoch AI (CC BY 4.0)         |
| APEX-Agents              | 52.8%  | 31                       | Long professional tasks (banking, consulting, law) passed on the first attempt                   | Mercor, via Epoch AI (CC BY 4.0)          |
| LMArena text             | 1471.7 | 25                       | Rating from blind human votes between pairs of chat responses                                    | LMArena (CC BY 4.0)                       |
| FrontierMath Tier 4      | 17.1%  | 50                       | Research-level mathematics problems, the hardest tier, with checkable answers                    | Epoch AI (CC BY 4.0)                      |
| Chess Puzzles            | 21%    | 59                       | Find the single best move in a chess position                                                    | Epoch AI (CC BY 4.0)                      |
| Mystery Game Puzzles     | 8%     | 68                       | Best-move puzzles in an undisclosed well-known game                                              | Epoch AI (CC BY 4.0)                      |
| ALE-Bench                | 303.6  | 100                      | Hard optimisation contest problems, as a rating against human contestants                        | Sakana AI, via Epoch AI (CC BY 4.0)       |
| Epoch Capabilities Index | 153.8  | 51                       | Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index | Epoch AI (CC BY 4.0)                      |

## Providers and prices

US dollars per million tokens.

| Provider              | Gateway  | Pydantic AI string                         | Input | Cached input | Output |
| --------------------- | -------- | ------------------------------------------ | ----- | ------------ | ------ |
| Z.ai                  | BYOK     | `zai:GLM-5.3-Flash`                        | $0.15 | $0.03        | $0.5   |
| Doubleword            | built in | `gateway/doubleword:zai-org/GLM-5.3-Flash` | $0.15 | $0.03        | $0.5   |
| Zhipu AI              | BYOK     | –                                          | $0.11 | $0.032       | $0.39  |
| Baseten               | BYOK     | –                                          | $0.15 | $0.03        | $0.5   |
| Cloudflare Workers AI | BYOK     | –                                          | $0.15 | $0.03        | $0.5   |
| Novita                | BYOK     | –                                          | $0.15 | $0.03        | $0.5   |
| OpenRouter            | BYOK     | `openrouter:z-ai/glm-5.3-flash`            | $0.15 | $0.03        | $0.5   |
| Perplexity            | BYOK     | –                                          | $0.15 | $0.03        | $0.5   |
| Together AI           | BYOK     | `together:zai-org/GLM-5.3-Flash`           | $0.15 | $0.03        | $0.5   |

## Use GLM 5.3 Flash with Pydantic AI

### hello.py

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

```python
# /// 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.3-Flash', instructions='Be concise, reply with one sentence.')

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

### structured_output.py

Get validated, typed output from GLM 5.3 Flash by giving the agent a Pydantic model. Run it with uv run structured_output.py.

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

from pydantic import BaseModel
from pydantic_ai import Agent

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


class CityLocation(BaseModel):
    city: str
    country: str


agent = Agent('gateway/doubleword:zai-org/GLM-5.3-Flash', output_type=CityLocation)

result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
```

### tools.py

Give GLM 5.3 Flash two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.

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

from pydantic_ai import Agent, RunContext

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

agent = Agent(
    'gateway/doubleword:zai-org/GLM-5.3-Flash',
    deps_type=str,
    instructions="You're a dice game, roll the die and see if it matches the user's guess.",
)


@agent.tool_plain
def roll_dice() -> str:
    """Roll a six-sided die and return the result."""
    return str(random.randint(1, 6))


@agent.tool
def get_player_name(ctx: RunContext[str]) -> str:
    """Get the player's name."""
    return ctx.deps


result = agent.run_sync('My guess is 4', deps='Anne')
print(result.output)
```

### streaming.py

Stream GLM 5.3 Flash's reply to the terminal as it is generated. Run it with uv run streaming.py.

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

from pydantic_ai import Agent

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

agent = Agent('gateway/doubleword:zai-org/GLM-5.3-Flash')


async def main():
    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:
        async for text in response.stream_text(delta=True):
            print(text, end='', flush=True)


asyncio.run(main())
```

### pax.sh

Code with GLM 5.3 Flash in your terminal using Pax, the Pydantic AI coding agent. On macOS, open a new terminal after installing, so pax isn't the system's archiver.

```sh
# uv tool install pydantic-ai-pax
export PYDANTIC_AI_GATEWAY_API_KEY='...'

pax -m 'gateway/doubleword:zai-org/GLM-5.3-Flash'
```

### codex.sh

Run OpenAI's Codex CLI on GLM 5.3 Flash through Pydantic AI Gateway.

```sh
# npm install -g @openai/codex
export PYDANTIC_AI_GATEWAY_API_KEY='...'

codex --model 'zai-org/GLM-5.3-Flash' \
  -c model_provider='gateway' \
  -c model_providers.gateway.name='Pydantic AI Gateway' \
  -c model_providers.gateway.base_url='https://gateway.pydantic.dev/proxy/doubleword/v1' \
  -c model_providers.gateway.env_key='PYDANTIC_AI_GATEWAY_API_KEY'
```

### ai_sdk.ts

Call GLM 5.3 Flash from TypeScript with the Vercel AI SDK, through Pydantic AI Gateway.

```ts
// npm install ai @ai-sdk/openai-compatible
import { createOpenAICompatible } from '@ai-sdk/openai-compatible'
import { generateText } from 'ai'

process.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'

const doubleword = createOpenAICompatible({
  baseURL: 'https://gateway.pydantic.dev/proxy/doubleword',
  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,
})

const { text } = await generateText({
  model: doubleword('zai-org/GLM-5.3-Flash'),
  system: 'Be concise, reply with one sentence.',
  prompt: 'Where does "hello world" come from?',
})
console.log(text)
```

## About GLM 5.3 Flash

GLM 5.3 Flash costs $0.15 per million input tokens and $0.5 per million output tokens, has a 1M token context window and scores 62.5 on our intelligence index, #39 of 101.

GLM 5.3 Flash is an open-weights model from Z.ai, released in August 2026. It accepts text, image and video input, supports tool calling, structured output and a reasoning mode, and has a 1M-token context window. Its listed price is $0.15 per million input tokens and $0.50 per million output tokens, well below the registry median blended price, and it is offered by nine providers.

On benchmarks it sits in the middle of the registry. Its intelligence index of 66.1 is above the median of 59.5, and it scores 65.8% on ARC-AGI-2, also above the median. It is close to the median on GPQA Diamond, OTIS Mock AIME and SciCode, and it trails the median on FrontierMath and APEX-Agents.

For a developer choosing a model, the main appeal is moderate capability at low cost, ranking 8th of 194 on intelligence per dollar. No knowledge cutoff is listed.

**Strengths**

- Intelligence index of 66.1, 36th of 114 and above the 59.5 median
- Blended price of $0.24 per million tokens, 8th of 194 on intelligence per dollar
- 1M-token context window with text, image and video input
- ARC-AGI-2 score of 65.8%, 30th of 68 tested

**Weaknesses**

- FrontierMath score of 55.8%, 51st of 80 and below the median
- APEX-Agents score of 52.8%, 32nd of 60 and below the median
- Epoch Capabilities Index of 153.8, 52nd of 98, just below the median

**Best for:** High-volume agents and tools where cost matters and long or multimodal inputs are common.

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
The model's reasoning is usually correct, but the tool call it emits often does not match that reasoning: it ends early with `final_result`, sends placeholder values, drops arguments, or sends duplicate output calls. Results were mid-range on Billing ops (70% in both modes) and LLM Judge (80%), high on Research & deck (90% tools, 96% code mode), 60% on Structured output, and near zero on SQL data analysis (0% tools, 20% code mode). Single-request extraction and judging tasks are cheap at about $0.001–$0.011 per case. Long multi-step searches over large data are where it fails most.

#### Strengths
- On Structured output its reasoning extracted the accounts correctly in all ten cases, scaling £000 figures, getting signs right and keeping group and parent columns separate, and it completed both ~150-field tier 5 outputs.
- On Billing ops it applied the handbook rules correctly in all four tutor-margin runs, and in code mode it found and corrected its own tax-deduction error by comparing against real invoice lines.
- On Research & deck both runs read the whole data room and handled every planted trap: the restated September revenue, app registrations, the prototype photo and the PDF with no text layer.
- On LLM Judge its verdicts cite checkable specifics such as invoice numbers, card endings and dates, and it verified refund and retention-window arithmetic.
- On SQL data analysis it understood service-day bitmasks, overnight runs, change margins and time interpolation in nearly every run.

#### Weaknesses
- On SQL data analysis 14 of 18 failures ended with a `final_result` holding placeholder or invented values (e.g. `run: "string"`, an empty `legs` list), often right after reasoning that said to run the search next.
- On Structured output all four failures were final `accounts` calls that dropped most fields its reasoning had already reconciled, and the missing fields defaulted to null with no validation error, so it could not repair them.
- On LLM Judge it emitted two `final_result` calls in one response in 4 of 10 cases, and in one case a garbled first call overrode a correct analysis.
- On Billing ops it made junk calls (`search_tutors("startup_burn")`, `"Array"` arguments, prose sent as code), dropped filters, and re-sent `void_invoice` after it had already succeeded.
- On Research & deck it under-used founder feedback in tools mode, asking twice and never showing a draft, which produced a deck containing elements the founder later ruled out.

#### Tool calling compared with code mode
- On Billing ops both modes scored 70%, but code mode cost $0.18 against $1.03, and on large cases it was much cheaper (e.g. $0.05 against $0.62 on `large-wrong_invoices-1`).
- On Billing ops small cases, code mode gave no benefit and used more requests (20 against 9 on `small-tutor_margin-3`).
- On SQL data analysis code mode produced the only passes (2 of 10 against 0 of 10) at about 47% higher cost, and it added its own failures: state-wiping restarts, timeouts and a missing `heapq`.
- On Research & deck code mode used nearly twice the requests for similar cost and produced the deck closer to the founder's wishes, because it computed figures in Python and got the draft reviewed through `ask_founder`.
- Code mode does not fix the early-`final_result` problem: on Billing ops and SQL data analysis it collected the data reliably, then sometimes answered without running the final computation.

Prices come from [genai-prices](https://github.com/pydantic/genai-prices), in US dollars per million tokens. Benchmark scores come from Epoch AI and LMArena (CC BY 4.0), Browser Use, and our own Pydantic AI benchmarks (CC BY 4.0); the index and its sources are described at https://pydantic.dev/models/methodology.md. Data built 2026-11-30. This model from the API: `https://pydantic.dev/models/api/models/glm-5.3-flash`. Compare it with others: `https://pydantic.dev/models/api/models?slug=glm-5.3-flash,<other slug>`
