
哈喽大家好,我是阿星👋
今天给你一个「有手就行」的 OpenClaw 配置方法。
不用改文件、不用记命令,
直接把下面的代码发给 OpenClaw,它自己帮你配好。

OpenClaw 已经装好了有对应平台的 API Key
改 "primary" 的值,比如: - "hongmacc/claude-sonnet-4-6" - "dashscope-coding/kimi-k2.5" - "aigocode/claude-opus-4-6"
发给 OpenClaw:粘贴到聊天窗口,等它说「搞定」
填 Key:把你有 Key 的地方填上,没有的可以删掉或留空
下面这是我自己的配置。
把下面这段完整复制, 把你有的 API Key 填进去 (没有的 provider 可以删掉,或者留着以后用),
然后把这篇文章特别是下面这段代码发给 OpenClaw:
请帮我把这段配置写入 ~/.openclaw/openclaw.json:{ "models": { "providers": { "hongmacc": { "baseUrl": "https://hongmacc.com", "apiKey": "sk-你的hongmaccKey", "api": "anthropic-messages", "headers": { "User-Agent": "Mozilla/5.0" }, "models": [ { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6 (hongmacc)", "api": "openai-completions", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 64000 } ] }, "dashscope": { "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1", "apiKey": "sk-你的阿里云Key", "api": "openai-completions", "models": [ { "id": "qwen3.5-plus", "name": "Qwen3.5-Plus", "api": "openai-completions", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 65536 } ] }, "dashscope-us": { "baseUrl": "https://dashscope-us.aliyuncs.com/compatible-mode/v1", "apiKey": "sk-你的阿里云USKey", "api": "openai-completions", "models": [ { "id": "qwen3-max-2025-09-23", "name": "qwen3-max-2025-09-23", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 32768, "maxTokens": 8192 } ] }, "dashscope-coding": { "baseUrl": "https://coding.dashscope.aliyuncs.com/v1", "apiKey": "sk-你的阿里云CodingKey", "api": "openai-completions", "models": [ { "id": "qwen3-max-2026-01-23", "name": "qwen3-max-2026-01-23", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 65536 }, { "id": "qwen3-coder-next", "name": "qwen3-coder-next", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 65536 }, { "id": "qwen3-coder-plus", "name": "qwen3-coder-plus", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 65536 }, { "id": "MiniMax-M2.5", "name": "MiniMax-M2.5", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": }, { "id": "glm-5", "name": "glm-5", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 16384 }, { "id": "glm-4.7", "name": "glm-4.7", "api": "openai-completions", "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 16384 }, { "id": "kimi-k2.5", "name": "Kimi K2.5", "api": "openai-completions", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 32768 }, { "id": "qwen3.5-plus", "name": "Qwen3.5-Plus", "api": "openai-completions", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 65536 } ] }, "aigocode": { "baseUrl": "https://api.aigocode.com", "apiKey": "sk-你的AIGoCodeKey", "api": "anthropic-messages", "headers": { "User-Agent": "Mozilla/5.0" }, "models": [ { "id": "claude-opus-4-6", "name": "Claude Opus 4.6 (AiGoCode)", "api": "anthropic-messages", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 64000 }, { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6 (AiGoCode)", "api": "anthropic-messages", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 64000 } ] }, "aigocode-gpt": { "baseUrl": "https://api.aigocode.com", "apiKey": "sk-你的AIGoCodeGPTKey", "api": "openai-responses", "models": [ { "id": "gpt-5.4", "name": "GPT-5.4 (AiGoCode)", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 16384, "api": "openai-responses" }, { "id": "gpt-5.3-codex", "name": "GPT-5.3 Codex (AiGoCode)", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": , "maxTokens": 16384, "api": "openai-responses" } ] } } }, "agents": { "defaults": { "model": { "primary": "aigocode/claude-opus-4-6" } } }}
配置完后执行 openclaw gateway restart 重启服务。你好,你是谁?

如果它醒来后特别晕,大概率是降智了或者站的原因。
别着急,直接去他们服务中心问问就行了。
我是阿星,
更多AI应用,我们下期再见!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/246833.html