Skip to content

OpenAI API 中转站配置教程

OpenAI API 中转站适合 Codex、Cherry Studio、LobeChat、ChatBox、Cursor 以及自写程序等 OpenAI 兼容客户端。使用 FlyMux 时,通常只需要填写统一的 API 地址和 API Key。

配置速查

配置项
API Base URLhttps://api.flymux.com/v1
API Keysk-你的API密钥
模型列表接口https://api.flymux.com/v1/models

cURL 验证

bash
curl https://api.flymux.com/v1/models \
  -H "Authorization: Bearer sk-你的API密钥"

如果返回模型列表,说明 OpenAI 兼容接口可以正常访问。

常见客户端填写方式

客户端API 地址
Codexhttps://api.flymux.com/v1
Cherry Studiohttps://api.flymux.com/v1
LobeChathttps://api.flymux.com/v1
ChatBoxhttps://api.flymux.com/v1
Cursorhttps://api.flymux.com/v1

如果客户端要求填写“Host”或“Proxy URL”,一般也填写 https://api.flymux.com/v1

自写代码示例

bash
curl https://api.flymux.com/v1/chat/completions \
  -H "Authorization: Bearer sk-你的API密钥" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      { "role": "user", "content": "你好,介绍一下 FlyMux" }
    ]
  }'

常见问题

OpenAI API 中转站和 Claude Code 中转站有什么区别

OpenAI 兼容客户端通常使用 https://api.flymux.com/v1。Claude Code 等 Anthropic 兼容工具通常使用 https://api.flymux.com,不带 /v1

提示 401 怎么办

检查 API Key 是否完整、是否包含 sk- 前缀、是否在请求头里使用 Authorization: Bearer

提示模型不存在怎么办

先访问模型列表接口确认当前 Key 可用模型,再在客户端里填写对应模型 ID。

如何控制团队成本

建议为不同成员或项目创建独立 API Key,并在控制台查看每个 Key 的调用记录、Token 用量和扣费明细。

继续阅读: