返回工具目录
桌面客户端

Cherry Studio

半自动:OpenAI 提供商 API 地址与模型

/v1/chat/completions半自动向导docs/ai-gateway-editor-more-tools.md#cherry-studio
创建 API Key
Base URLhttps://api.4stoken.cn
鉴权方式Authorization: Bearer sk-...
协议/v1/chat/completions
Download

下载安装教程

先安装工具本体,再运行 4SToken 配置脚本。Windows 与 macOS / Linux 分开操作。

安装前准备
准备已安装 Cherry Studio
准备已创建 Portal Client Key
准备准备 gpt-5.5 或 openrouter-free 等 modelCode
Windows
1安装并打开 Cherry Studio
2运行本页 PowerShell 向导,生成 %USERPROFILE%\.cherrystudio\signal-gateway-setup.txt
3进入设置 → 模型服务 → 添加 OpenAI 提供商
4API 地址填 https://api.4stoken.cn/v1,API Key 填 Client Key,模型填 Portal modelCode
macOS / Linux
1安装并打开 Cherry Studio
2运行本页 macOS / Linux 向导,生成 ~/.cherrystudio/signal-gateway-setup.txt
3进入设置 → 模型服务 → 添加 OpenAI 提供商
4API 地址填 https://api.4stoken.cn/v1,API Key 填 Client Key,模型填 Portal modelCode
Install

配置命令

将命令中的 YOUR_API_KEY 替换成你的 Client Key。

macOS / Linux
curl -fsSL https://4stoken.cn/docs/scripts/cherry-studio.sh | GATEWAY_BASE_URL='https://api.4stoken.cn' bash -s -- YOUR_API_KEY
Windows PowerShell
$f = Join-Path $env:TEMP 'cherry-studio.ps1'; Invoke-WebRequest -Uri 'https://4stoken.cn/docs/scripts/cherry-studio.ps1' -OutFile $f -UseBasicParsing; powershell -NoProfile -ExecutionPolicy Bypass -File $f -ApiKey YOUR_API_KEY
Verify

配置检查

按顺序检查:先测接口连通,再做模拟调用,最后回到具体软件核对配置是否真正生效。

连通性检查

先确认 Key、Base URL 与模型列表接口可达。

执行模型列表查询,确认返回 200 且能看到可用模型
curl https://api.4stoken.cn/v1/models -H "Authorization: Bearer YOUR_API_KEY"

模拟调用

绕开客户端先打一次最小请求,确认网关协议与模型路由正确。

执行最小请求,确认没有 401、403、404、模型不存在或无路由错误
curl https://api.4stoken.cn/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d "{\"model\":\"gpt-5.5\",\"messages\":[{\"role\":\"user\",\"content\":\"hello\"}]}"

其他

回到具体软件内确认配置文件、界面设置或重启步骤已经生效。

Cherry Studio 中启用 Signal / OpenAI 提供商
发送一条测试消息并确认响应
Models

支持的模型 code

Cherry Studio

以当前工具配置的网关协议为准。

支持的 modelCode系统实际模型协议说明
gpt-5.5gpt-5.5/v1/chat/completions主力 GPT 模型
gpt-5.4gpt-5.4/v1/chat/completions稳定 GPT 档位
gpt-5.4-minigpt-5.4-mini/v1/chat/completions轻量 GPT 档位
openrouter-freeopenrouter-free/v1/chat/completions备用 / 免费线路

以上列表来自 Portal 已发布模型;客户端里优先填写表格第一列。完整可用范围仍以 GET /v1/models 与「模型与价格」页为准。

Notes

接入边界

  • 脚本仅修改本机工具配置文件,可通过上方源码链接审计。
  • 执行前可设置 GATEWAY_BASE_URL 覆盖默认网关地址。
  • 该工具需要在客户端内完成最终确认或 Add Custom Model。
  • GET /v1/realtime 未开放,不影响编程工具接入。