Z.AI (Zai) with OpenClaw

Configure GLM-5, GLM-4.7, Coding Plan — API key

Z.AI (Zai) provides access to Zhipu’s GLM models in OpenClaw. GLM-5, GLM-4.7, GLM-4.6, and Coding Plan variants. Popular for Chinese users and coding tasks. Onboard with zai-api-key.

Quick Setup

Onboard
openclaw onboard --auth-choice zai-api-key

Get an API key from the Z.AI console. Configure model as zai/glm-5 or zai/glm-4-7.

Models

  • GLM-5 — Flagship
  • GLM-4.7, GLM-4.6 — Strong general use
  • Coding Plan — Code-optimized

Configuration example

Minimal agent model
{
  "agent": {
    "model": "zai/glm-5"
  }
}

Store the API key via onboard or openclaw secrets. See Secrets.

Why Z.AI

  • Direct GLM access — Newest Zhipu models without an extra proxy.
  • Coding Plan — Separate SKUs for repository-heavy workloads.
  • Regional endpoints — Often lower latency for APAC operators.

Compare with GLM overview (Volcano vs Z.AI paths).

Troubleshooting

  • 401 / invalid key — Re-run openclaw onboard --auth-choice zai-api-key or refresh via Secrets.
  • Model not found — Run openclaw models list; slugs like zai/glm-5 change with provider releases.
  • Rate limits — Use Coding Plan SKUs for agent loops; route heartbeats to a smaller model per model routing.

Coding Plan vs general GLM

Use Coding Plan SKUs when the agent runs long tool loops over repositories; use GLM-5 or GLM-4.7 for conversational chat. Mixing them in one session is fine—set the default model in config and override per automation job if needed.

Related