Windows 安装 OpenClaw + MiniMax 教程
本文提供了在Windows系统上安装OpenClaw并配置MiniMax模型的详细教程。主要内容包括:1) OpenClaw安装步骤(Node.js环境要求、PowerShell或npm安装方式);2) MiniMax模型配置的三种方法(OAuth认证、API Key手动配置、作为备用模型);3) 验证配置和常见问题解决方法。文章包含详细的命令行操作和配置文件示例,帮助用户快速完成AI开发环境的搭
·
Windows 安装 OpenClaw + MiniMax 教程
一、安装 OpenClaw
1. 前置要求
- Node.js >=22
- 下载地址:https://nodejs.org (选择 LTS 版本)
检查版本:
node -v
2. 安装 OpenClaw
方式一:使用 PowerShell 安装脚本(推荐)
以管理员身份运行 PowerShell:
iwr -useb https://openclaw.ai/install.ps1 | iex
方式二:手动 npm 安装
npm install -g openclaw@latest
3. 初始化配置
# 运行安装向导
openclaw onboard --install-daemon
# 检查安装状态
openclaw doctor
openclaw status
openclaw health
二、配置 MiniMax 模型
MiniMax 提供两个版本:
- MiniMax M2.1 - 标准版
- MiniMax M2.1 Lightning - 快速版
方法 1:使用 OAuth(推荐,无需 API Key)
# 启用 MiniMax OAuth 插件
openclaw plugins enable minimax-portal-auth
openclaw gateway restart
openclaw onboard --auth-choice minimax-portal
系统会提示选择节点:
- Global - 国际用户 (
api.minimax.io) - CN - 中国用户 (
api.minimaxi.com)
方法 2:使用 API Key
步骤 1:获取 MiniMax API Key
- 访问:https://platform.minimax.io
- 注册账号并获取 API Key
步骤 2:配置环境变量
# 设置 API Key(临时)
$env:MINIMAX_API_KEY = "sk-你的API密钥"
或永久保存到系统环境变量。
步骤 3:运行配置向导
openclaw configure
依次选择:
- Model/auth
- MiniMax M2.1
- 设置默认模型
步骤 4:手动编辑配置文件
如果需要手动配置,编辑 ~/.openclaw/openclaw.json:
{
env: {
MINIMAX_API_KEY: "sk-你的API密钥"
},
agents: {
defaults: {
model: {
primary: "minimax/MiniMax-M2.1"
}
}
},
models: {
mode: "merge",
providers: {
minimax: {
baseUrl: "https://api.minimax.io/anthropic",
apiKey: "${MINIMAX_API_KEY}",
api: "anthropic-messages",
models: [
{
id: "MiniMax-M2.1",
name: "MiniMax M2.1",
reasoning: false,
input: ["text"],
cost: { input: 15, output: 60, cacheRead: 2, cacheWrite: 10 },
contextWindow: 200000,
maxTokens: 8192,
},
{
id: "MiniMax-M2.1-lightning",
name: "MiniMax M2.1 Lightning",
reasoning: false,
input: ["text"],
cost: { input: 15, output: 80, cacheRead: 2, cacheWrite: 10 },
contextWindow: 200000,
maxTokens: 8192,
}
],
},
},
},
}
方法 3:MiniMax 作为备用模型(Opus 为主)
{
env: { MINIMAX_API_KEY: "sk-..." },
agents: {
defaults: {
models: {
"anthropic/claude-opus-4-5": { alias: "opus" },
"minimax/MiniMax-M2.1": { alias: "minimax" },
},
model: {
primary: "anthropic/claude-opus-4-5",
fallbacks: ["minimax/MiniMax-M2.1"],
},
},
},
}
三、验证配置
# 列出可用模型
openclaw models list
# 切换到 MiniMax
openclaw models set minimax/MiniMax-M2.1
# 测试模型
openclaw chat "你好,请介绍一下你自己"
四、常见问题
| 问题 | 解决方案 |
|---|---|
openclaw: command not found |
将 npm prefix -g 路径加入 PATH |
未知模型 minimax/MiniMax-M2.1 |
检查 API Key 或启用 OAuth 插件 |
| 认证失败 | 确认 API Key 正确或重新运行 OAuth 认证 |
更多推荐

所有评论(0)