---
title: "Add Z.ai (GLM) models"
description: "Route requests to Zhipu AI GLM models, including GLM-4.6, GLM-4.7, and GLM-5.2, through the OpenAI-compatible chat completions endpoint."
date: 2026-06-24
tags: ["TIE AI Gateway"]
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Z.ai (GLM) models

TIE now routes requests to Zhipu AI (Z.ai) GLM models. Select a model by passing a `zai/`-prefixed name to `/v1/chat/completions`, the same way you select any other provider.

```json
{
  "model": "zai/glm-4.6",
  "messages": [{ "role": "user", "content": "Hello" }]
}
```

## Available models

| Model | Notes |
|-------|-------|
| `zai/glm-5.2` | Latest flagship |
| `zai/glm-5.1` | Previous flagship |
| `zai/glm-5-turbo` | Faster, lower-cost tier |
| `zai/glm-5` | General-purpose |
| `zai/glm-4.7` | Strong agentic coding and reasoning |
| `zai/glm-4.7-flash` | Lightweight, low-latency |
| `zai/glm-4.6` | 200K context window |
| `zai/glm-4.5` | Prior generation |

GLM models support tool calling and a thinking reasoning mode. They run through Z.ai's OpenAI-compatible API, so existing request and response handling needs no changes.

## Configuration

Set `ZAI_API_KEY` to enable the provider. When Z.ai is the only configured provider, `glm-4.6` becomes the default model. Override the default with `DEFAULT_MODEL=zai/glm-5.2`.

Query `GET /info` to confirm which models are active on your instance.

See the [chat completions reference](/ai-gateway/chat-completions/#supported-providers) for the full provider list.

Source: https://truememory-docs.mvstg.com/changelog/tie-ai-gateway/2026-06-24-zai-glm-models//index.md
