File size: 7,848 Bytes
80ad408 e8f7f62 80ad408 e8f7f62 80ad408 e8f7f62 80ad408 e8f7f62 80ad408 e8f7f62 80ad408 e8f7f62 80ad408 e8f7f62 80ad408 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | ---
license: mit
tags:
- tutorial
- crazyrouter
- chatbox
- cherry-studio
- nextchat
- lobechat
- chatgpt
- ai-client
- llm
language:
- en
- zh
---
# 💬 Crazyrouter 客户端配置指南
> 一个 API Key,在所有主流 AI 客户端中使用 624+ 模型
[Crazyrouter](https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community) 完全兼容 OpenAI API,因此所有支持自定义 OpenAI 端点的客户端都可以直接使用。
## 通用配置信息
所有客户端的配置都用这三个值:
| 配置项 | 值 |
|--------|-----|
| API Base URL | `https://crazyrouter.com/v1` |
| API Key | `sk-your-crazyrouter-key`(在 [crazyrouter.com](https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community) 获取) |
| 模型 | `gpt-4o`、`claude-sonnet-4-20250514`、`deepseek-chat` 等 |
---
## ChatBox
[ChatBox](https://chatboxai.app/) 是一款跨平台 AI 桌面客户端,支持 Windows、macOS、Linux、iOS、Android。
### 配置步骤
1. 打开 ChatBox → 设置(Settings)
2. 选择 **AI Provider** → **OpenAI API Compatible**
3. 填写:
- **API Host**: `https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community`
- **API Path**: `/v1/chat/completions`
- **API Key**: `sk-your-crazyrouter-key`
- **Model**: 输入模型名称,如 `gpt-4o`
4. 点击 **Save**
### 多模型切换
在 ChatBox 中可以创建多个 AI Provider 配置:
- 配置 1:`gpt-4o`(通用对话)
- 配置 2:`claude-sonnet-4-20250514`(编程分析)
- 配置 3:`deepseek-chat`(省钱日常)
在对话中随时切换。
---
## Cherry Studio
[Cherry Studio](https://cherry-ai.com/) 是一款功能丰富的 AI 客户端,支持多模型对话、知识库、AI 绘画。
### 配置步骤
1. 打开 Cherry Studio → 设置 → 模型服务商
2. 点击 **添加服务商** → 选择 **OpenAI**
3. 填写:
- **名称**: `Crazyrouter`
- **API 地址**: `https://crazyrouter.com/v1`
- **API 密钥**: `sk-your-crazyrouter-key`
4. 点击 **获取模型列表**(自动拉取 624+ 模型)
5. 选择需要的模型,保存
### 特色功能
- 支持自动获取模型列表
- 多模型同时对话对比
- 内置知识库 RAG
- 支持 DALL-E 绘画(通过 Crazyrouter)
---
## NextChat (ChatGPT Next Web)
[NextChat](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web) 是最流行的开源 ChatGPT 网页客户端。
### 本地部署
```bash
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY="sk-your-crazyrouter-key" \
-e BASE_URL="https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community" \
yidadaa/chatgpt-next-web
```
### Vercel 一键部署
1. Fork [NextChat 仓库](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web)
2. 在 Vercel 导入项目
3. 设置环境变量:
- `OPENAI_API_KEY` = `sk-your-crazyrouter-key`
- `BASE_URL` = `https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community`
- `CUSTOM_MODELS` = `+gpt-4o,+claude-sonnet-4-20250514,+deepseek-chat,+gemini-2.0-flash`
4. 部署
### 网页端设置
如果已部署,在设置页面:
- **接口地址**: `https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community`
- **API Key**: `sk-your-crazyrouter-key`
- **自定义模型名**: 添加需要的模型
---
## LobeChat
[LobeChat](https://github.com/lobehub/lobe-chat) 是一款现代化的开源 AI 聊天框架。
### Docker 部署
```bash
docker run -d -p 3210:3210 \
-e OPENAI_API_KEY="sk-your-crazyrouter-key" \
-e OPENAI_PROXY_URL="https://crazyrouter.com/v1" \
lobehub/lobe-chat
```
### 网页端设置
1. 打开 LobeChat → 设置 → 语言模型
2. 找到 **OpenAI** 配置
3. 填写:
- **API Key**: `sk-your-crazyrouter-key`
- **API 代理地址**: `https://crazyrouter.com/v1`
4. 开启 **自定义模型名称**,添加模型
### 添加其他模型
LobeChat 支持多个 Provider,你可以把 Crazyrouter 配置为 OpenAI Provider,然后在模型列表中添加所有需要的模型名。
---
## Open WebUI
[Open WebUI](https://github.com/open-webui/open-webui) 是一款类 ChatGPT 的开源 Web UI。
### Docker 部署
```bash
docker run -d -p 8080:8080 \
-e OPENAI_API_BASE_URL="https://crazyrouter.com/v1" \
-e OPENAI_API_KEY="sk-your-crazyrouter-key" \
ghcr.io/open-webui/open-webui:main
```
### 网页端设置
1. 登录 Open WebUI → 管理面板 → 设置 → 连接
2. 添加 OpenAI API 连接:
- **URL**: `https://crazyrouter.com/v1`
- **Key**: `sk-your-crazyrouter-key`
3. 保存后自动拉取模型列表
---
## BotGem (原 AMA)
[BotGem](https://botgem.com/) 支持 macOS、iOS、Android、Windows。
### 配置步骤
1. 打开 BotGem → 设置 → 服务商
2. 选择 **OpenAI Compatible**
3. 填写:
- **Endpoint**: `https://crazyrouter.com/v1`
- **API Key**: `sk-your-crazyrouter-key`
- **Model**: `gpt-4o`
4. 保存
---
## Chatwise
[Chatwise](https://chatwise.app/) 是一款简洁的 macOS/iOS AI 客户端。
### 配置步骤
1. 设置 → 模型 → 添加自定义模型
2. 选择 **OpenAI Compatible**
3. 填写 API URL 和 Key
4. 手动输入模型名称
---
## LibreChat
[LibreChat](https://github.com/danny-avila/LibreChat) 是一款功能强大的开源 AI 聊天平台。
### Docker 部署
在 `.env` 文件中配置:
```env
OPENAI_API_KEY=sk-your-crazyrouter-key
OPENAI_REVERSE_PROXY=https://crazyrouter.com/v1/chat/completions
```
在 `librechat.yaml` 中添加自定义端点:
```yaml
endpoints:
custom:
- name: "Crazyrouter"
apiKey: "${CRAZYROUTER_API_KEY}"
baseURL: "https://crazyrouter.com/v1"
models:
default: ["gpt-4o", "gpt-4o-mini", "claude-sonnet-4-20250514", "deepseek-chat", "gemini-2.0-flash"]
titleConvo: true
titleModel: "gpt-4o-mini"
```
---
## Coze / 扣子
[Coze](https://www.coze.com/) 支持自定义模型接入。
### 配置步骤
1. 在 Coze 工作台 → 插件 → 自定义模型
2. 选择 OpenAI 兼容格式
3. 填写 Crazyrouter 的 API 地址和 Key
4. 选择模型
---
## Dify
[Dify](https://dify.ai/) 是一款开源的 LLM 应用开发平台。
### 配置步骤
1. 设置 → 模型供应商 → 添加 **OpenAI-API-compatible**
2. 填写:
- **模型名称**: `gpt-4o`(或其他模型)
- **API Key**: `sk-your-crazyrouter-key`
- **API endpoint URL**: `https://crazyrouter.com/v1`
3. 保存并测试
可以添加多个模型,在不同的应用中使用不同的模型。
---
## 通用技巧
### 环境变量方式
很多客户端支持环境变量,统一设置后所有客户端自动生效:
```bash
export OPENAI_API_KEY="sk-your-crazyrouter-key"
export OPENAI_API_BASE="https://crazyrouter.com/v1"
```
### 模型推荐
| 场景 | 推荐模型 | 原因 |
|------|----------|------|
| 日常对话 | `gpt-4o-mini` | 快速、便宜 |
| 深度分析 | `gpt-4o` / `claude-sonnet-4-20250514` | 最强推理 |
| 编程辅助 | `deepseek-chat` / `claude-sonnet-4-20250514` | 代码能力强 |
| 长文档 | `gemini-2.0-flash` | 100万 token 上下文 |
| 数学推理 | `deepseek-reasoner` / `o3-mini` | 链式推理 |
| 省钱 | `deepseek-chat` | $0.14/百万 token |
---
## 链接
- 🌐 [Crazyrouter](https://crazyrouter.com/?utm_source=huggingface&utm_medium=tutorial&utm_campaign=dev_community) — 获取 API Key
- 🤖 [在线 Demo](https://huggingface.co/spaces/xujfcn/Crazyrouter-Demo)
- 💰 [价格对比](https://huggingface.co/spaces/xujfcn/Crazyrouter-Pricing)
- 📖 [快速入门](https://huggingface.co/xujfcn/Crazyrouter-Getting-Started)
- 💬 [Telegram 社区](https://t.me/crazyrouter)
- 🐦 [Twitter @metaviiii](https://twitter.com/metaviiii)
|