Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

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.
PropertyValue
Provider idzai
Pluginbundled, enabledByDefault: true
Auth env varsZAI_API_KEY or Z_AI_API_KEY
Onboarding choiceszai-api-key, zai-coding-global, zai-coding-cn, zai-global, zai-cn
APIOpenAI-compatible
Default base URLhttps://api.z.ai/api/paas/v4
Suggested defaultzai/glm-5.1
Default image modelzai/glm-4.6v

Getting started

1

Choose an auth route and run onboarding

Pick the onboarding choice that matches your Z.AI plan and region. The generic zai-api-key choice auto-detects the matching endpoint from the key shape; use the explicit regional choices when you want to force a specific Coding Plan or general API surface.
Auth choiceBest for
zai-api-keyGeneric API key with endpoint auto-detection
zai-coding-globalCoding Plan users (global)
zai-coding-cnCoding Plan users (China region)
zai-globalGeneral API (global)
zai-cnGeneral API (China region)
openclaw onboard --auth-choice zai-api-key
2

Set GLM as the default model

openclaw config set agents.defaults.model.primary "zai/glm-5.1"
3

Verify models are available

openclaw models list --provider zai

Config example

{
  env: { ZAI_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "zai/glm-5.1" } } },
}
zai-api-key lets OpenClaw detect the matching Z.AI endpoint from the key shape and apply the correct base URL automatically. Use the explicit regional choices when you want to pin a specific Coding Plan or general API surface.

Built-in catalog

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 refNotes
zai/glm-5.1Default model. Reasoning, text only, 202k context.
zai/glm-5Reasoning, text only, 202k context.
zai/glm-5-turboReasoning, text only, 202k context.
zai/glm-5v-turboReasoning, text + image, 202k context.
zai/glm-4.7Reasoning, text only, 204k context.
zai/glm-4.7-flashReasoning, text only, 200k context.
zai/glm-4.7-flashxReasoning, text only.
zai/glm-4.6Reasoning, text only.
zai/glm-4.6vReasoning, text + image. Default image model.
zai/glm-4.5Reasoning, text only.
zai/glm-4.5-airReasoning, text only.
zai/glm-4.5-flashReasoning, text only.
zai/glm-4.5vReasoning, text + image.
GLM versions and availability can change. Run openclaw models list --provider zai to see the catalog rows known to your installed version, and check Z.AI’s docs for newly added or deprecated models.

Advanced configuration

When you use the zai-api-key auth choice, OpenClaw inspects the key shape to determine the correct Z.AI base URL. Explicit regional choices (zai-coding-global, zai-coding-cn, zai-global, zai-cn) override auto-detection and pin the endpoint directly.
GLM models are served by the zai runtime provider. For full provider configuration, regional endpoints, and additional capabilities, see the Z.AI provider page.

Z.AI provider

Full Z.AI provider configuration and regional endpoints.

Model providers

Choosing providers, model refs, and failover behavior.

Thinking modes

/think levels for the reasoning-capable GLM family.

Models FAQ

Auth profiles, switching models, and resolving “no profile” errors.