OpenClaw 本文为您介绍编码套餐接入OpenClaw的详细步骤。 OpenClaw 添加模型配置 方式一:通过Web UI修改配置文件(适用于Windows或者Mac系统) 1. 在终端执行以下命令打开 Web UI。 plaintext openclaw dashboard 2. 在Web UI的左侧菜单栏中选择 “配置”> “All Settings” > “RAW”。 3. 复制以下内容(以GLM MAX(旗舰版)为例)到Raw JSONS输入框,替换已有内容,并将YOURAPIKEY替换为为你购买的编程套餐专属的API Key。 注意 配置models下的id和modelname来源于您当前购买实际套餐的可用模型,以下示例配置以GLM MAX(旗舰版)为例,不同编码套餐支持调用的模型不一样 plaintext { "models": { "mode": "merge", "providers": { "xirang": { "baseUrl": " "apiKey": "YOURAPIKEY", "api": "openaicompletions", "models": [ { "id": "GLM5", "name": "GLM5", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 204800, "maxTokens": 131072 }, { "id": "GLM5Turbo", "name": "GLM5Turbo", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 204800, "maxTokens": 131072 }, { "id": "GLM5.1", "name": "GLM5.1", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 204800, "maxTokens": 131072 }, { "id": "GLM4.7", "name": "GLM4.7", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 204800, "maxTokens": 131072 }, { "id": "GLM4.6", "name": "GLM4.6", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 204800, "maxTokens": 131072 }, { "id": "GLM4.5", "name": "GLM4.5", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 131072, "maxTokens": 65536 }, { "id": "GLM4.5Air", "name": "GLM4.5Air", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 131072, "maxTokens": 4096 } ] } } }, "agents": { "defaults": { "model": { "primary": "xirang/GLM5" }, "models": { "xirang/GLM5": {}, "xirang/GLM5Turbo": {}, "xirang/GLM5.1": {}, "xirang/GLM4.7": {}, "xirang/GLM4.6": {}, "xirang/GLM4.5": {}, "xirang/GLM4.5Air": {} } } }, "gateway": { "mode": "local" } } 4. 点击右上角 Save 保存,再点击 Update 使配置生效,保存成功后,apiKey将显示为“OPENCLAWREDACTED”。由于脱敏保护,仅在前端界面隐藏,不影响实际调用。