Codex 接入 bubu12key.top
本页是 bubu12key 官方维护的 OpenAI Codex 安装与配置指南。Codex 的接入地址统一使用 https://bubu12key.top/v1,密钥请在 bubu12key.top 控制台创建。
Windows
1. 安装 Node.js
同 Claude Code,需要 Node.js 18+。
2. 安装 Codex
npm i -g @openai/codex --registry=https://registry.npmmirror.com
3. 配置
创建 C:\Users\你的用户名\.codex\config.toml:
model_provider = "custom"
model = "gpt-5.3-codex"
model_reasoning_effort = "xhigh"
disable_response_storage = true
[model_providers.custom]
name = "custom"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://bubu12key.top/v1"
创建 auth.json:
{
"OPENAI_API_KEY": "你的API密钥"
}
4. 使用
codex
Linux
1. 安装
npm install -g @openai/codex
2. 配置环境变量
echo 'export OPENAI_BASE_URL="https://bubu12key.top/v1"' >> ~/.bashrc
echo 'export OPENAI_API_KEY="你的API密钥"' >> ~/.bashrc
source ~/.bashrc
3. 使用
codex
macOS
1. 安装
npm install -g @openai/codex
2. 配置环境变量
echo 'export OPENAI_BASE_URL="https://bubu12key.top/v1"' >> ~/.zshrc
echo 'export OPENAI_API_KEY="你的API密钥"' >> ~/.zshrc
source ~/.zshrc
3. 使用
codex
VSCode
1. 安装扩展
在 VSCode 扩展市场搜索并安装 Codex - OpenAI's coding agent。
2. 配置
在 ~/.codex/auth.json:
{
"OPENAI_API_KEY": "你的API密钥"
}
在 ~/.codex/config.toml:
model_provider = "custom"
model = "gpt-5.3-codex"
model_reasoning_effort = "xhigh"
disable_response_storage = true
[model_providers.custom]
name = "custom"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://bubu12key.top/v1"
桌面版
1. 安装
Windows 可访问 Codex Windows App 文档 下载,或使用命令安装:
winget install Codex -s msstore
Mac / Windows 也可通过 Codex CLI 启动或安装桌面版:
codex app
2. 使用
安装后打开 Codex,添加项目即可使用。Windows 需要 WSL 时可在设置中切换 Agent 到 WSL,并重启应用。