OpenClaw 最新版本 自定义中转站配置教程(2026年3月更新)

发布时间:2026/7/9 21:57:57

OpenClaw 最新版本 自定义中转站配置教程(2026年3月更新) 第一步安装与基础初始化首先确保你已经安装了 Node.js 环境然后在终端执行1.全局安装npm install -g openclawlatest2.执行引导根据提示完成基础设置openclaw onboard第二步修改主配置文件openclaw**.json**打开路径C:\\Users\\admin\\.openclaw\\openclaw.json将models和auth部分修改为以下内容以支持自定义中转站。若电脑为MAC系统则需要找到.openclaw目录再找到.openclaw\\openclaw.json文件。注意primary: api-proxy-claude/claude-sonnet-4-5-20250929意思是使用的默认模型如果你配置的不是claude需要将其换成你配置的模型例如你想配置gpt5.2则需要修改为primary: pi-proxy-gpt/gpt-5.2。88API大模型中转站https://api.88api.shop{ agents: { defaults: { model: { primary: api-proxy-claude/claude-sonnet-4-5-20250929 }, models: { api-proxy-gpt/gpt-5.2: { alias: GPT-5.2 }, api-proxy-claude/claude-sonnet-4-5-20250929: { alias: Claude Sonnet 4.5 }, api-proxy-google/gemini-3-pro-preview: { alias: Gemini 3 Pro }, api-proxy-deepseek/deepseek-v3.2: { alias: Deepseek v3.2 } }, workspace: C:\\\\Users\\\\admin\\\\clawd, maxConcurrent: 4, subagents: { maxConcurrent: 8 } } }, auth: { profiles: { api-proxy-gpt:default: { provider: api-proxy-gpt, mode: api_key }, api-proxy-claude:default: { provider: api-proxy-claude, mode: api_key }, api-proxy-google:default: { provider: api-proxy-google, mode: api_key }, api-proxy-deepseek:default: { provider: api-proxy-deepseek, mode: api_key } } }, models: { mode: merge, providers: { api-proxy-gpt: { baseUrl: https://api.88api.chat/v1, api: openai-completions, models: [ { id: gpt-5.2, name: GPT-5.2, reasoning: false, input: [ text ], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 128000, maxTokens: 8192 } ] }, api-proxy-claude: { baseUrl: https://api.88api.chat, api: anthropic-messages, models: [ { id: claude-sonnet-4-5-20250929, name: Claude Sonnet 4.5, reasoning: false, input: [ text ], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 200000, maxTokens: 8192 } ] }, api-proxy-google: { baseUrl: https://api.88api.chat/v1, api: google-generative-ai, models: [ { id: gemini-3-pro-preview, name: Gemini 3 Pro, reasoning: false, input: [ text ], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 8192 } ] }, api-proxy-deepseek: { baseUrl: https://api.88api.chat/v1, api: openai-completions, models: [ { id: deepseek-v3.2, name: Deepseek v3.2, reasoning: false, input: [ text ], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 2000000, maxTokens: 8192 } ] } } } }第三步配置鉴权文件auth-profiles.json打开路径C:\\\\Users\\\\admin\\\\.openclaw\\\\agents\\\\main\\\\agent\\\\auth-profiles.json在此处填入你从中转站获取的真实 API Key。若电脑为MAC系统则需要找到.openclaw目录再找到.openclaw\\agents\\main\\agent\\auth-profiles.json文件。{ version: 1, profiles: { api-proxy-gpt:default: { type: api_key, provider: api-proxy-gpt, key: sk-your-unique-gpt-key-here }, api-proxy-claude:default: { type: api_key, provider: api-proxy-claude, key: sk-your-unique-claude-key-here }, api-proxy-google:default: { type: api_key, provider: api-proxy-google, key: sk-your-unique-google-key-here }, api-proxy-deepseek:default: { type: api_key, provider: api-proxy-deepseek, key: sk-your-unique-deepseek-key-here } } }第四步检查并启动启动 Gateway 服务openclaw gateway --port 18789访问控制台打开浏览器访问http://127.0.0.1:18789/

相关新闻