---
title: Z.AI
---

<!-- THIS FILE IS AUTO-GENERATED BY website/scripts/generate-model-docs.js. DO NOT EDIT MANUALLY. -->

# Z.AI

Use `zai/<model>` with VoltAgent's model router.

## Quick start

```ts
import { Agent } from "@voltagent/core";

const agent = new Agent({
  name: "zai-agent",
  instructions: "You are a helpful assistant",
  model: "zai/glm-4.5",
});
```

## Environment variables

- `ZHIPU_API_KEY`

## Provider package

`@ai-sdk/openai-compatible`

This provider uses the OpenAI-compatible adapter.

## Default base URL

`https://api.z.ai/api/paas/v4`

You can override the base URL by setting `ZAI_BASE_URL`.

## Provider docs

- https://docs.z.ai/guides/overview/pricing

## Models

<details>
  <summary>Show models (7)</summary>

- glm-4.5
- glm-4.5-air
- glm-4.5-flash
- glm-4.5v
- glm-4.6
- glm-4.6v
- glm-4.7

</details>
