# GLM 4.5V

> Open-weights vision-language model from Z.ai, released August 2025, with tool calling and reasoning mode. Its one benchmark result sits near the bottom of the registry.

Use it with Pydantic AI as `zai:GLM-4.5V`.

## Spec sheet

- **Family:** Z.ai
- **Released:** 11 Aug 2025
- **Weights:** open
- **Context window:** 65,536 tokens
- **Largest response:** 16,384 tokens
- **Accepts:** text, image
- **Tool calling:** yes
- **Knowledge cutoff:** 2025-04
- **Intelligence index:** not enough benchmark results yet
- **Price:** $0.6 input, $1.8 output, $0.9 blended per 1M tokens
- **Index points per $:** – (rank –)
- **Speed:** 37.5 tokens/sec (rank 158)
- **Popularity:** rank 183 of 194 by usage
- **Pydantic AI Gateway:** not built in; [bring your own key](https://ai.pydantic.dev/gateway/#bring-your-own-key)

## Benchmarks

| Benchmark | Score | Rank among models tested | What it measures | Source |
| --- | --- | --- | --- | --- |
| LMArena text | 1332.6 | 110 | Rating from blind human votes between pairs of chat responses | LMArena (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-4.5V` | $0.6 | $0.11 | $1.8 |
| Novita | BYOK | – | $0.6 | $0.11 | $1.8 |
| OpenRouter | BYOK | `openrouter:z-ai/glm-4.5v` | $0.6 | $0.11 | $1.8 |

## Example code

### hello.py

Ask GLM 4.5V 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['ZAI_API_KEY'] = '...'

agent = Agent('zai:GLM-4.5V', 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 4.5V 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['ZAI_API_KEY'] = '...'


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


agent = Agent('zai:GLM-4.5V', 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 4.5V 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['ZAI_API_KEY'] = '...'

agent = Agent(
    'zai:GLM-4.5V',
    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 4.5V'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['ZAI_API_KEY'] = '...'

agent = Agent('zai:GLM-4.5V')


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

Chat with GLM 4.5V in your terminal using pax, the TUI for pydantic-ai-harness. Coming soon.

```sh
export ZAI_API_KEY='...'

uvx pax --model 'zai:GLM-4.5V'
```

### pi.sh

Use GLM 4.5V as the model behind the pi coding agent, with your own Z.ai key.

```sh
# npm install -g @earendil-works/pi-coding-agent
export ZAI_API_KEY='...'

pi --model 'zai/GLM-4.5V'
```

### ai_sdk.ts

Call GLM 4.5V from TypeScript with the Vercel AI SDK.

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

process.env.ZAI_API_KEY = '...'

const zai = createOpenAICompatible({
  name: 'zai',
  baseURL: 'https://api.zai.example/v1',
  apiKey: process.env.ZAI_API_KEY,
})

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

## About GLM 4.5V

GLM 4.5V is an open-weights model from Z.ai, released in August 2025, that accepts both text and image input. It supports tool calling and a reasoning mode, which suits agents that read screenshots, documents or charts and then call functions. Its knowledge cutoff is April 2025.

Its registry standing is weaker. The only benchmark result is LMArena text, where it scores 1332.6 against a median of 1437.6 and ranks 110th of 114. There are no intelligence index results, so its capability is hard to judge beyond that single figure. Its popularity rank is 183rd of 194.

The context window is 65k tokens with a 16k response limit, and structured output is not supported. Pricing is $0.6 per million input tokens and $1.8 per million output tokens, a blended $0.9 that sits just below the median. It is available from Z.ai, Novita and OpenRouter.

**Strengths**

- Accepts both text and image input
- Open weights, available from three providers
- Supports tool calling and reasoning mode
- Blended price of $0.9 per million tokens, just below the $1.01 median

**Weaknesses**

- LMArena text rating 1332.6, 110th of 114, against a median of 1437.6
- Popularity rank 183rd of 194
- Context window of 65k tokens and no structured output

**Best for:** Image-plus-text tasks with tool calling where a low-cost open model is needed and benchmark standing matters less.

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); the index and its sources are described at https://models.pydantic.dev/methodology.md. Data built 2026-11-25. Compare with other models: https://models.pydantic.dev/models.md
