docs/providers/glm.md
GLM is a model family (not a company) available through the Z.AI platform. In OpenClaw, GLM models are accessed through the bundled zai provider with refs like zai/glm-5.1.
| Property | Value |
|---|---|
| Provider id | zai |
| Plugin | bundled, enabledByDefault: true |
| Auth env vars | ZAI_API_KEY or Z_AI_API_KEY |
| Onboarding choices | zai-api-key, zai-coding-global, zai-coding-cn, zai-global, zai-cn |
| API | OpenAI-compatible |
| Default base URL | https://api.z.ai/api/paas/v4 |
| Suggested default | zai/glm-5.1 |
| Default image model | zai/glm-4.6v |
| Auth choice | Best for |
| ------------------- | --------------------------------------------------- |
| `zai-api-key` | Generic API key with endpoint auto-detection |
| `zai-coding-global` | Coding Plan users (global) |
| `zai-coding-cn` | Coding Plan users (China region) |
| `zai-global` | General API (global) |
| `zai-cn` | General API (China region) |
<CodeGroup>
openclaw onboard --auth-choice zai-api-key
openclaw onboard --auth-choice zai-coding-global
openclaw onboard --auth-choice zai-coding-cn
openclaw onboard --auth-choice zai-global
openclaw onboard --auth-choice zai-cn
</CodeGroup>
{
env: { ZAI_API_KEY: "sk-..." },
agents: { defaults: { model: { primary: "zai/glm-5.1" } } },
}
The bundled zai provider seeds 13 GLM model refs. All entries support reasoning unless marked otherwise; glm-5v-turbo and glm-4.6v accept image input as well as text.
| Model ref | Notes |
|---|---|
zai/glm-5.1 | Default model. Reasoning, text only, 202k context. |
zai/glm-5 | Reasoning, text only, 202k context. |
zai/glm-5-turbo | Reasoning, text only, 202k context. |
zai/glm-5v-turbo | Reasoning, text + image, 202k context. |
zai/glm-4.7 | Reasoning, text only, 204k context. |
zai/glm-4.7-flash | Reasoning, text only, 200k context. |
zai/glm-4.7-flashx | Reasoning, text only. |
zai/glm-4.6 | Reasoning, text only. |
zai/glm-4.6v | Reasoning, text + image. Default image model. |
zai/glm-4.5 | Reasoning, text only. |
zai/glm-4.5-air | Reasoning, text only. |
zai/glm-4.5-flash | Reasoning, text only. |
zai/glm-4.5v | Reasoning, text + image. |