OpenClawSkills
GitHub
Providers • TutorialHeader.readTime

Z.AI

Use Z.AI (GLM models) with OpenClaw

Z.AI is an API platform for <strong>GLM</strong> models. It provides REST APIs for GLM and uses API keys

for authentication. Create your API key in the Z.AI console. OpenClaw uses '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'zai'</code>' provider

with a Z.AI API key.

Tutorial.step

CLI setup

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

openclaw onboard --zai-api-key "$ZAI_API_KEY"
Tutorial.step

Config snippet

Json5
{
  env: { ZAI_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "zai/glm-4.7" } } },
}
Tutorial.step

Notes

- GLM models are available as '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'zai/&lt;model&gt;'</code>' (example: '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'zai/glm-4.7'</code>').

- See '<a href="/providers/glm" className="text-emerald-400 hover:text-emerald-300 transition-colors">'/providers/glm'</a>' for model family overview.

- Z.AI uses Bearer auth with your API key.