mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 14:51:08 +00:00
1.8 KiB
1.8 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Use Z.AI (GLM models) with OpenClaw |
|
Z.AI |
Z.AI
Z.AI is the API platform for GLM models. It provides REST APIs for GLM and uses API keys
for authentication. Create your API key in the Z.AI console. OpenClaw uses the zai provider
with a Z.AI API key.
CLI setup
# Generic API-key setup with endpoint auto-detection
openclaw onboard --auth-choice zai-api-key
# Coding Plan Global, recommended for Coding Plan users
openclaw onboard --auth-choice zai-coding-global
# Coding Plan CN (China region), recommended for Coding Plan users
openclaw onboard --auth-choice zai-coding-cn
# General API
openclaw onboard --auth-choice zai-global
# General API CN (China region)
openclaw onboard --auth-choice zai-cn
Config snippet
{
env: { ZAI_API_KEY: "sk-..." },
agents: { defaults: { model: { primary: "zai/glm-5" } } },
}
zai-api-key lets OpenClaw detect the matching Z.AI endpoint from the key and
apply the correct base URL automatically. Use the explicit regional choices when
you want to force a specific Coding Plan or general API surface.
Bundled GLM catalog
OpenClaw currently seeds the bundled zai provider with:
glm-5.1glm-5glm-5-turboglm-5v-turboglm-4.7glm-4.7-flashglm-4.7-flashxglm-4.6glm-4.6vglm-4.5glm-4.5-airglm-4.5-flashglm-4.5v
Notes
- GLM models are available as
zai/<model>(example:zai/glm-5). - Default bundled model ref:
zai/glm-5 tool_streamis enabled by default for Z.AI tool-call streaming. Setagents.defaults.models["zai/<model>"].params.tool_streamtofalseto disable it.- See /providers/glm for the model family overview.
- Z.AI uses Bearer auth with your API key.