openclaw UI方式配置API

1,531 阅读1分钟

在执行 openclaw dashborad 指令后打开带有token的url链接,进到如下页面

image.png

添加模型 (这里以通义千问 Max Thinking 版举例)

右侧config -->models --> provider, 点击add entry

image.png

表格中内容填写按照如下格式:

providers: {
      bailian: {
        baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
        apiKey: "替换为你的API key",
        api: "openai-completions",
        models: [
          {
            id: "qwen3-max-2026-01-23",
            name: "通义千问 Max Thinking 版",
            reasoning: false,
            input: ["text"],
            cost: { input: 0.0025, output: 0.01, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 262144,
            maxTokens: 65536
          }
        ]
      }
    }

应用模型

将添加的模型设为默认: config --> agents -->Default -->Model 按照以下格式填写内容

(1. 在models里添加entry

  1. 将primary model 字段改为bailian/qwen3-max-2026-01-23)
agents: {
    defaults: {
      model: { primary: "bailian/qwen3-max-2026-01-23" },
      models: {
        "bailian/qwen3-max-2026-01-23": { alias: "通义千问 Max Thinking 版" }
      }
    }

如图

image.png

image.png

点击save 保存配置

配置生效 + 验证模型状态

在终端运行以下指令,保证配置能够生效:

# 方式一:停止服务后,再启动服务
openclaw gateway stop
# 等待 2-3 秒后启动服务
openclaw gateway start
# 方式二:直接使用重启命令
openclaw gateway restart

你还可以通过以下指令看刚刚设置的模型是否被 Clawdbot 识别:

openclaw models list

image.png

你还可以通过以下指令进行一次真实连通探测(会发真实请求,可能产生费用~)

openclaw models status --probe

image.png

搞定

image.png

参考文章:🦞 如何在 Moltbot 配置阿里云百炼 API-阿里云开发者社区