---
title: "Z.ai Integration"
source: https://docs.autohand.ai/integrations/zai
---

# Z.ai

Use Z.ai's GLM-family models from Autohand through an OpenAI-compatible provider configuration.

## Overview

Z.ai is available as the `zai` provider. It is useful for teams that want GLM-family models with straightforward API-key setup and model switching inside Autohand.

## Setup

``` bash
export ZAI_API_KEY="your-zai-api-key"

autohand --provider zai --model glm-5.2
```

## CLI configuration

``` json
{
  "provider": "zai",
  "zai": {
    "apiKey": "${ZAI_API_KEY}",
    "baseUrl": "https://api.z.ai/api/paas/v4",
    "model": "glm-5.2"
  }
}
```

| Option | Description | Default |
|---|---|---|
| apiKey | Your Z.ai API key | - |
| baseUrl | Z.ai API endpoint | https://api.z.ai/api/paas/v4 |
| model | GLM model ID | glm-5.2 |

## Models

Use `/model` to select a Z.ai model or enter a custom model ID supported by your Z.ai account.

``` bash
/model zai/glm-5.2
```