Z.AI
Z.AI 是 GLM 模型的 API 平台。它提供 GLM 的 REST API,並使用 API 金鑰進行驗證。在 Z.AI 控制台中建立您的 API 金鑰。OpenClaw 使用 zai 提供者搭配 Z.AI API 金鑰。
CLI 設定
Section titled “CLI 設定”# Coding Plan Global, recommended for Coding Plan usersopenclaw onboard --auth-choice zai-coding-global
# Coding Plan CN (China region), recommended for Coding Plan usersopenclaw onboard --auth-choice zai-coding-cn
# General APIopenclaw onboard --auth-choice zai-global
# General API CN (China region)openclaw onboard --auth-choice zai-cn{ env: { ZAI_API_KEY: "sk-..." }, agents: { defaults: { model: { primary: "zai/glm-5" } } },}- GLM 模型可作為
zai/<model>使用 (例如:zai/glm-5)。 tool_stream針對 Z.AI 工具呼叫串流預設為啟用。將agents.defaults.models["zai/<model>"].params.tool_stream設定為false即可停用它。- 請參閱 /providers/glm 以瞭解模型系列概觀。
- Z.AI 使用您的 API 金鑰進行 Bearer 驗證。