Skip to main content
Providers

Z.AI

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

Quick start

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

Models

Show models (7)
  • glm-4.5
  • glm-4.5-air
  • glm-4.5-flash
  • glm-4.5v
  • glm-4.6
  • glm-4.6v
  • glm-4.7

Table of Contents