DOC 06客户端接入
OpenClaw 配置教程
使用一键脚本或手动配置 OpenClaw,选择 Claude 或 Codex 通道并连接 spiderai。
通过 spiderai 接入 OpenClaw。推荐使用一键脚本,按提示选择 Anthropic(Claude)或 OpenAI(Codex / GPT)通道。
| 通道 | 接口地址 | 说明 |
|---|---|---|
| Anthropic(Claude) | https://api.spiderai.fun | 不要带 /v1,示例模型 claude-opus-5-5 |
| OpenAI(Codex / GPT) | https://api.spiderai.fun/v1 | 必须带 /v1,示例模型 gpt-6.1-sol |
提示
这是外接客户端:Claude 通道用 Claude 经济版、Claude 通用版或 Claude 官方 API 分组的密钥,OpenAI 通道用 GPT 经济版、GPT 通用版或 GPT 官方 API 分组的密钥。Claude Code 专用和 GPT Codex 专用分组只能在各自的官方客户端里使用。
推荐方式:交互式一键脚本
运行后选择通道和模型、输入 API 密钥。没装 OpenClaw 时脚本会先安装(需要 Node.js 24.16+),再用 OpenClaw 自带的 openclaw onboard 写入配置。
curl -fsSL https://spiderai.fun/install/openclaw.sh | bash提示
请先在密钥页创建对应分组的密钥,再按提示粘贴。配置前脚本会请你确认 OpenClaw 的安全提示:智能体可以在本机执行命令、读写文件。Windows 请在 WSL 里运行,或使用下面的手动方式。
备用方式:手动安装与配置 OpenClaw需要审查命令或一键脚本不可用时再展开。
第一步:安装 OpenClaw
npm install -g openclaw@latest注意
OpenClaw 需要 Node.js 24.16+ 或 26.1+(不支持 25.x),可先运行
node --version 确认。第二步:选择接入通道
export CUSTOM_API_KEY="YOUR_API_KEY"
openclaw onboard --non-interactive --accept-risk \
--auth-choice custom-api-key \
--custom-base-url https://api.spiderai.fun \
--custom-compatibility anthropic \
--custom-model-id claude-opus-5-5 \
--custom-provider-id spiderai-claude \
--skip-channels --skip-daemon --skip-skills --skip-search --skip-health --skip-ui$env:CUSTOM_API_KEY = "YOUR_API_KEY"
openclaw onboard --non-interactive --accept-risk `
--auth-choice custom-api-key `
--custom-base-url https://api.spiderai.fun `
--custom-compatibility anthropic `
--custom-model-id claude-opus-5-5 `
--custom-provider-id spiderai-claude `
--skip-channels --skip-daemon --skip-skills --skip-search --skip-health --skip-uiexport CUSTOM_API_KEY="YOUR_API_KEY"
openclaw onboard --non-interactive --accept-risk \
--auth-choice custom-api-key \
--custom-base-url https://api.spiderai.fun/v1 \
--custom-compatibility openai \
--custom-model-id gpt-6.1-sol \
--custom-provider-id spiderai-codex \
--skip-channels --skip-daemon --skip-skills --skip-search --skip-health --skip-ui$env:CUSTOM_API_KEY = "YOUR_API_KEY"
openclaw onboard --non-interactive --accept-risk `
--auth-choice custom-api-key `
--custom-base-url https://api.spiderai.fun/v1 `
--custom-compatibility openai `
--custom-model-id gpt-6.1-sol `
--custom-provider-id spiderai-codex `
--skip-channels --skip-daemon --skip-skills --skip-search --skip-health --skip-ui--accept-risk 表示你已了解 OpenClaw 的智能体拥有本机的完整权限,非交互配置必须带上它。Anthropic(Claude)通道使用根地址,不要加 /v1。
提示
请将
YOUR_API_KEY 替换为在密钥页复制的密钥。提示
以后要更换密钥时,再运行一次同样的命令:OpenClaw 会把新密钥先存为未启用,并打印一条
openclaw models auth activate … 命令,运行它即可测试并启用新密钥。一键脚本会自动完成这一步。开始使用
打开终端对话界面:
openclaw chat也可以单次提问:
openclaw agent --local --agent main --message "你好"提示
直接运行
openclaw(不带参数)会连接后台 Gateway。需要接入 Telegram 等聊天渠道时,再运行 openclaw onboard 按向导配置 Gateway。