一个 API Key,
接入所有 vibe coding 客户端
One API Key,
for every vibe-coding client
byecore 聚合 OpenAI、Claude、Gemini 等诸多模型厂商,提供 OpenAI 与 Anthropic 双协议兼容的统一路由。无论你使用 Codex CLI、Claude Code、Cursor,还是任意支持自定义 Base URL 的 AI 编程客户端,把接口地址指向 byecore 即可开始工作。
byecore aggregates OpenAI, Claude, Gemini and many other model providers behind a single route compatible with both the OpenAI and Anthropic protocols. Whether you use Codex CLI, Claude Code, Cursor, or any AI coding client that lets you set a custom Base URL, just point the endpoint at byecore and start working.
https://api.byecore.com
Quick Start
三步接入
Three-Step Setup
不管你最终使用哪个客户端,接入流程都是一样的三步。整个过程通常不超过五分钟。
Whichever client you end up using, the setup is the same three steps — and it usually takes less than five minutes.
创建 API Key
Create an API Key
前往
byecore 控制台
创建密钥,并确认该 Key 拥有目标模型的调用权限。Key 形如 sk-…。
Open the
byecore Console
to create a key, and confirm it has access to the models you want to call. Keys look like sk-….
选择接入方式
Choose how to connect
新手推荐用 CC Switch 一键写入配置;熟悉配置文件的用户可直接查阅 客户端接入指南 手动填写 Base URL 与 Key。
Newcomers can use CC Switch to write the config in one click; if you are comfortable editing config files, jump straight to the client guides and fill in the Base URL and Key by hand.
验证连通性
Verify connectivity
按 连通性测试 一节用 curl 验证
Key 与模型是否可用,再重启客户端开始使用。
Follow the Health Check section to verify your Key and models with curl, then restart the client and start working.
https://api.byecore.com(不带任何后缀;OpenAI 兼容客户端通常需补
/v1,Claude 协议客户端填根地址即可),鉴权填你的
sk-密钥,模型名按控制台模型列表填写。记住这三件事,本页任何客户端都能照此接入。
https://api.byecore.com (no suffix; OpenAI-compatible clients usually need to add
/v1, while Claude-protocol clients use the root address), authentication with your
sk- key, and a model name taken from the Console's model list. Remember these three things and any client on this page connects the same way.
API Basics
接口与鉴权
API & Authentication
byecore 同时兼容 OpenAI 与 Anthropic 两套 API
规范,且两套协议完全互通——网关自动转换请求格式,控制台中的任意模型都可以通过任一协议调用。统一入口为
https://api.byecore.com(不带任何后缀),不同协议的客户端按下表填写 Base URL:
byecore is compatible with both the OpenAI and Anthropic API
specifications, and the two protocols are fully interoperable — the gateway converts request
formats automatically, so any model in the Console can be called over either protocol. The unified endpoint is
https://api.byecore.com (no suffix); clients on different protocols fill in the Base URL per the table below:
- 统一入口
- Unified endpoint
https://api.byecore.com- OpenAI 兼容客户端
- OpenAI-compatible clients
-
https://api.byecore.com/v1(多数客户端要求带/v1;Cherry Studio 等会自动补全的只填根地址) -
https://api.byecore.com/v1(most clients require the/v1suffix; clients that auto-complete it, such as Cherry Studio, take only the root address) - Claude 协议客户端
- Claude-protocol clients
-
https://api.byecore.com(Claude Code 等会自动追加/v1/messages) -
https://api.byecore.com(Claude Code and similar append/v1/messagesautomatically)
| 端点 | Endpoint | 方法 | Method | 用途 | Purpose |
|---|---|---|---|---|---|
/v1/models |
GET | 列出当前 Key 可用的模型,常用于验证 Key 是否有效 | List the models available to the current Key; commonly used to verify the Key is valid | ||
/v1/chat/completions |
POST | OpenAI Chat Completions,多数客户端默认使用 | OpenAI Chat Completions; the default for most clients | ||
/v1/responses |
POST | OpenAI Responses API,Codex CLI 使用(wire_api = "responses") |
OpenAI Responses API, used by Codex CLI (wire_api = "responses") |
||
/v1/messages |
POST | Anthropic Messages API,Claude Code 等 Claude 生态使用 | Anthropic Messages API, used by Claude Code and the wider Claude ecosystem |
鉴权统一通过 HTTP Header 传递:
Authentication is always passed via an HTTP header:
# OpenAI 协议客户端
Authorization: Bearer sk-你的密钥
# Anthropic 协议客户端
x-api-key: sk-你的密钥
# OpenAI-protocol clients
Authorization: Bearer sk-your-key
# Anthropic-protocol clients
x-api-key: sk-your-key
https://api.byecore.com/v1/chat/completions,Claude 协议应为
https://api.byecore.com/v1/messages。多写或漏写
/v1 是最常见的错误,各客户端的准确写法见下文逐项说明。
https://api.byecore.com/v1/chat/completions for the OpenAI protocol, and
https://api.byecore.com/v1/messages for the Claude protocol. Adding or omitting
/v1 by mistake is the most common error; the exact form for each client is covered item by item below.
sk- 密钥提交进 Git 仓库或贴到公开场合。建议为不同客户端分别创建
Key,便于审计用量与单独吊销。
sk- keys to a Git repository or paste them in public.
Create a separate Key for each client so you can audit usage and revoke individually.
Providers
支持的模型厂商
Supported Providers
byecore 聚合多家主流模型厂商,统一入口、统一鉴权、统一计费。具体在售模型与版本以
控制台
实时列表为准,也可以随时调用 /v1/models 查询当前 Key 可用的全部模型。
byecore aggregates many leading model providers behind one endpoint, one set of credentials, and one billing system. The exact models and versions on offer follow the live list in the
Console; you can also call /v1/models at any time to see every model available to the current Key.
OpenAI
GPT · Codex 系列 GPT · Codex familyAnthropic
Claude 系列 Claude familyxAI
Grok 系列 Grok familyDeepSeek
DeepSeek 系列 DeepSeek family阿里 · 通义
Alibaba · Tongyi
Qwen 系列 Qwen family月之暗面
Moonshot AI
Kimi 系列 Kimi family更多厂商
More providers
持续接入中 Continuously addedgpt-5.4 作为示例模型名,实际使用时请替换为你账户内可用的模型名;图片模型的使用方式见
第 06 章 图片模型。
gpt-5.4 as the sample model name; replace it with a model available in your account. For image models, see
Chapter 06 · Image Models.
Switcher Ecosystem
切换与管理工具
Switching & Management Tools
当你需要在多个路由、多个 Key、多个模型之间频繁切换时,手动编辑配置文件容易出错。开源社区已经有一批成熟的切换与代理工具,按需选择其一即可。
When you frequently switch between multiple routes, keys, and models, editing config files by hand is error-prone. The open-source community already offers a set of mature switching and proxy tools — pick whichever fits your needs.
| 工具 | Tool | 形态 | Form | 服务对象 | For | 一句话定位 | In one line |
|---|---|---|---|---|---|---|---|
| CC Switch | 桌面 GUI · 开源 | Desktop GUI · open source | Claude Code / Codex 等 CLI | CLIs such as Claude Code / Codex | 多供应商配置集中管理,一键切换并自动写入配置文件 | Centrally manage multi-provider configs, switch in one click, and write config files automatically | |
| Claude Code Router | 本地路由 · 开源 CLI | Local router · open-source CLI | Claude Code | 把 Claude Code 的请求转发到任意 OpenAI 兼容路由,并按场景分流模型 | Forward Claude Code requests to any OpenAI-compatible route and route models by scenario | ||
| LiteLLM Proxy | 本地网关 · 开源 | Local gateway · open source | 任意 OpenAI 兼容客户端 | Any OpenAI-compatible client | 聚合多个上游为本地统一 /v1,客户端零改动换上游 |
Aggregate multiple upstreams into one local /v1 and swap upstreams with zero client changes |
CC Switch — 推荐首选
CC Switch — recommended
GUI · 新手友好 GUI · beginner-friendly
CC Switch 是开源的桌面端供应商切换器,支持把 byecore 路由保存为一个
Provider,并自动写入 Codex、Claude Code 等工具的配置文件。它能避免手动编辑
config.toml / auth.json 时常见的路径、格式或密钥错误,之后切换路由、模型、Key 都只需点一下。
CC Switch is an open-source desktop provider switcher. It can save the byecore route as a
Provider and write the config files for tools like Codex and Claude Code automatically. It avoids the path, format, and key mistakes common when editing
config.toml / auth.json by hand; afterwards, switching route, model, or Key takes just one click.
下载安装
Download & install
前往 GitHub Releases 下载与你系统匹配的安装包并打开。
Go to GitHub Releases, download the installer that matches your system, and open it.
添加 Provider
Add a Provider
按客户端类型新增 Provider,填入下方核心参数。
Add a Provider for your client type and fill in the core fields below.
同步到客户端
Sync to the client
勾选同步到 Codex / Claude Code,CC Switch 自动写入对应配置文件。
Enable sync to Codex / Claude Code and CC Switch writes the matching config files automatically.
一键切换
Switch in one click
之后换模型、换 Key、换路由都在 CC Switch 里完成,无需再碰配置文件。
From then on, change model, Key, or route inside CC Switch — no need to touch config files again.
Endpoint (Codex): https://api.byecore.com/v1
Endpoint (Claude Code): https://api.byecore.com
API Key: sk-你的密钥
Default Model: 按控制台列表选择(示例 gpt-5.4)
Endpoint (Codex): https://api.byecore.com/v1
Endpoint (Claude Code): https://api.byecore.com
API Key: sk-your-key
Default Model: pick from the Console list (e.g. gpt-5.4)
Claude Code Router (CCR)
CLI · Claude Code 专用 CLI · Claude Code onlyClaude Code 可以直连 byecore(见 5.2),网关自动完成协议转换,任意模型均可直接调用。开源的 Claude Code Router 面向进阶玩法:按「默认 / 推理 / 长上下文 / 后台」等场景自动分流到不同模型,或在多个上游路由之间做本地编排。
Claude Code can connect to byecore directly (see 5.2); the gateway handles protocol conversion, so any model is callable as-is. The open-source Claude Code Router is for advanced setups: it routes to different models automatically by scenario — default, reasoning, long context, background — or orchestrates across multiple upstream routes locally.
# 1. 全局安装(需要先安装 Node.js 与 Claude Code)
npm install -g @musistudio/claude-code-router
# 2. 完成下方配置后,用 ccr 启动 Claude Code
ccr code
# 1. Install globally (Node.js and Claude Code required first)
npm install -g @musistudio/claude-code-router
# 2. After the config below, start Claude Code with ccr
ccr code
{
"Providers": [
{
"name": "byecore",
"api_base_url": "https://api.byecore.com/v1/chat/completions",
"api_key": "sk-你的密钥",
"models": ["gpt-5.4", "gpt-5.5", "gpt-5.3-codex"]
}
],
"Router": {
"default": "byecore,gpt-5.4",
"background": "byecore,gpt-5.4",
"think": "byecore,gpt-5.5",
"longContext": "byecore,gpt-5.4"
}
}
LiteLLM Proxy
本地网关 · 进阶 Local gateway · advanced
如果你同时维护多个上游路由,或希望团队成员的客户端只指向一个固定地址,可以用
LiteLLM 在本地(或内网服务器)起一个统一网关。客户端永远只填
http://localhost:4000/v1,换上游只改网关配置,不动任何客户端。
If you maintain several upstream routes at once, or want your team's clients to point at a single fixed address, you can use
LiteLLM to run a unified gateway locally (or on an internal server). Clients always use
http://localhost:4000/v1; to change upstreams you edit only the gateway config and touch no client.
model_list:
- model_name: gpt-5.4
litellm_params:
model: openai/gpt-5.4
api_base: https://api.byecore.com/v1
api_key: sk-你的密钥
- model_name: gpt-5.5
litellm_params:
model: openai/gpt-5.5
api_base: https://api.byecore.com/v1
api_key: sk-你的密钥
pip install 'litellm[proxy]'
litellm --config config.yaml --port 4000
# 客户端 Base URL 填: http://localhost:4000/v1
pip install 'litellm[proxy]'
litellm --config config.yaml --port 4000
# Set the client Base URL to: http://localhost:4000/v1
Client Guides
客户端接入指南
Client Setup Guides
以下客户端均可通过「OpenAI 兼容 / 自定义 Base URL」或 Anthropic 协议接入 byecore。卡片角标对应详细配置的小节编号,点击即可跳转。
Every client below can connect to byecore via an OpenAI-compatible / custom Base URL or the Anthropic protocol. The badge on each card is the section number for its detailed config — click to jump there.
Codex CLI
推荐Recommendedconfig.toml + auth.json,走 Responses API,本站首选终端 Agent。
config.toml + auth.json over the Responses API; our preferred terminal agent.
查看配置 ↘ View config ↘Claude Code
直连Direct原生 Anthropic 协议直连,两个环境变量即可接入。
Direct over the native Anthropic protocol; two env vars are all it takes.
查看配置 ↘ View config ↘Aider
CLI两个环境变量 + 一条命令,最轻量的终端结对编程工具。
Two env vars plus one command — the lightest terminal pair-programming tool.
查看配置 ↘ View config ↘OpenCode
CLIopencode.json 中声明自定义 Provider,TUI 体验出色。
Declare a custom Provider in opencode.json; an excellent TUI experience.
查看配置 ↘ View config ↘Crush
CLICharm 出品的终端 Agent,crush.json 声明 OpenAI 兼容 Provider。
Charm's terminal agent; declare an OpenAI-compatible Provider in crush.json.
查看配置 ↘ View config ↘Droid (Factory)
CLI在 ~/.factory/config.json 中添加 BYOK 自定义模型即可。
Just add a BYOK custom model in ~/.factory/config.json.
查看配置 ↘ View config ↘Cursor
IDE在设置中覆盖 OpenAI Base URL,手动添加自定义模型名。
Override the OpenAI Base URL in settings and add custom model names by hand.
查看配置 ↘ View config ↘Cline
VS Code选择 OpenAI Compatible Provider,填 Base URL、Key 与模型 ID。
Choose the OpenAI Compatible Provider and fill in Base URL, Key, and Model ID.
查看配置 ↘ View config ↘Roo Code
VS CodeCline 的增强分支,配置方式与 Cline 完全一致。
An enhanced fork of Cline; configured exactly the same way.
查看配置 ↘ View config ↘Kilo Code
VS Code同样基于 OpenAI Compatible Provider,三件套照填即可。
Also based on the OpenAI Compatible Provider; fill in the same three fields.
查看配置 ↘ View config ↘Continue
VS Code / JBconfig.yaml 中声明 openai Provider 与 apiBase。
Declare an openai Provider and apiBase in config.yaml.
查看配置 ↘ View config ↘Zed
编辑器Editorsettings.json 配置 openai.api_url 与 available_models。
Set openai.api_url and available_models in settings.json.
查看配置 ↘ View config ↘Cherry Studio
桌面Desktop添加 OpenAI 类型提供商,地址会自动补全 /v1。
Add an OpenAI-type provider; the address auto-completes /v1.
查看配置 ↘ View config ↘Chatbox
桌面Desktop添加「OpenAI API 兼容」自定义提供方即可接入。
Add an "OpenAI API compatible" custom provider and you're connected.
查看配置 ↘ View config ↘LobeChat
Web / 桌面Web / DesktopOpenAI 设置中填 API 代理地址与 Key,手动添加模型。
In OpenAI settings, set the API proxy address and Key, then add models by hand.
查看配置 ↘ View config ↘NextChat
Web / 桌面Web / Desktop自定义接口地址 + 自定义模型名,两步完成。
A custom endpoint plus a custom model name — done in two steps.
查看配置 ↘ View config ↘Codex CLI
推荐 · Responses API Recommended · Responses API
Codex 接入 byecore 需要两个文件:config.toml 放模型与服务商配置,
auth.json 放 API Key。推荐先用
CC Switch 自动写入;以下为手动配置的完整内容。
Connecting Codex to byecore takes two files: config.toml holds the model and provider config, and
auth.json holds the API Key. We recommend using
CC Switch to write them automatically; the full manual config follows.
macOS / Linux
两个文件位于用户目录的 .codex 文件夹:
Both files live in the .codex folder in your home directory:
~/.codex/config.toml
~/.codex/auth.json
Windows
位于用户目录下的 .codex 文件夹:
In the .codex folder under your user directory:
%userprofile%\.codex\config.toml
%userprofile%\.codex\auth.json
model_provider = "OpenAI"
model = "gpt-5.4"
review_model = "gpt-5.4"
model_reasoning_effort = "xhigh"
disable_response_storage = true
network_access = "enabled"
windows_wsl_setup_acknowledged = true
model_context_window = 1000000
model_auto_compact_token_limit = 900000
[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://api.byecore.com/v1"
wire_api = "responses"
requires_openai_auth = true
{
"OPENAI_API_KEY": "sk-你的密钥"
}
model_provider、model 与
[model_providers.OpenAI] 段落位于 config.toml
的开头部分;文件不存在时手动创建即可。Codex 走 OpenAI 协议,base_url
需保留 /v1 后缀。保存后重启 Codex 生效。
model_provider, model, and
[model_providers.OpenAI] section sit near the top of config.toml;
create the file by hand if it doesn't exist. Codex uses the OpenAI protocol, so base_url
must keep the /v1 suffix. Restart Codex after saving for changes to take effect.
Claude Code
Anthropic 协议直连 Direct over Anthropic protocol
byecore 原生提供 Anthropic 兼容端点,Claude Code 无需任何中间件即可直连:把
ANTHROPIC_BASE_URL 指向根地址(注意不要带 /v1 后缀),令牌填你的
sk- 密钥。网关自动完成协议转换,控制台中的任意模型都可以在 Claude Code 中使用。
byecore provides a native Anthropic-compatible endpoint, so Claude Code connects directly with no middleware: point
ANTHROPIC_BASE_URL at the root address (do not add the /v1 suffix) and use your
sk- key as the token. The gateway handles protocol conversion, so any model in the Console works inside Claude Code.
export ANTHROPIC_BASE_URL="https://api.byecore.com"
export ANTHROPIC_AUTH_TOKEN="sk-你的密钥"
claude
$env:ANTHROPIC_BASE_URL = "https://api.byecore.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-你的密钥"
claude
想长期固化配置,写入 Claude Code 的全局设置文件即可:
To make the config permanent, write it into Claude Code's global settings file:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.byecore.com",
"ANTHROPIC_AUTH_TOKEN": "sk-你的密钥"
}
}
/model 模型名 切换模型,或启动前用
ANTHROPIC_MODEL 环境变量指定默认模型。多路由管理推荐交给
CC Switch(4.1)一键写入与切换;需要按场景自动分流模型时,再选用
Claude Code Router(4.2)。
/model model-name, or set a default before launch via the
ANTHROPIC_MODEL environment variable. For managing multiple routes, let
CC Switch (4.1) write and switch in one click; when you need automatic per-scenario model routing, use
Claude Code Router (4.2).
Cursor
IDE · 覆盖 Base URL IDE · override Base URLCursor 支持用自有 Key 覆盖官方 OpenAI 接口,步骤如下:
Cursor lets you override the official OpenAI endpoint with your own Key. The steps:
- 入口
- Where
- Cursor Settings → Models → API Keys
- OpenAI API Key
- 启用并填入
sk-你的密钥 - Enable it and enter
sk-your-key - Override Base URL
- 勾选 Override OpenAI Base URL,填
https://api.byecore.com/v1 - Check "Override OpenAI Base URL" and enter
https://api.byecore.com/v1 - 添加模型
- Add models
- 在模型列表中 Add model,手动输入
gpt-5.4、gpt-5.5等,并只勾选这些自定义模型 - Add model in the model list, manually enter
gpt-5.4,gpt-5.5, etc., and enable only these custom models - 验证
- Verify
- 点击 Verify,通过后即可在 Chat / Composer 中选用 byecore 模型
- Click Verify; once it passes, you can use byecore models in Chat / Composer
Cline · Roo Code · Kilo Code
VS Code 三件套 VS Code trio这三款 VS Code Agent 插件同源同构,配置界面几乎一致:在插件设置中选择 OpenAI Compatible 作为 API Provider,然后填三件套。
These three VS Code agent extensions share the same origin and structure, and their settings UIs are nearly identical: in the extension settings, choose OpenAI Compatible as the API Provider, then fill in the three fields.
- API Provider
OpenAI Compatible- Base URL
https://api.byecore.com/v1- API Key
sk-你的密钥- Model ID
gpt-5.4(编程密集型任务可改gpt-5.3-codex,重分析任务用gpt-5.5)gpt-5.4(usegpt-5.3-codexfor coding-heavy tasks,gpt-5.5for analysis-heavy ones)
1000000;建议开启流式输出
(Streaming)。Roo Code 与 Kilo Code 支持为不同 Mode 绑定不同模型,可以把 Architect
模式绑到 gpt-5.5、Code 模式绑到 gpt-5.3-codex。
1000000, and enable Streaming. Roo Code and Kilo Code support binding different models to different Modes — for example, bind Architect mode to
gpt-5.5 and Code mode to gpt-5.3-codex.
Continue
VS Code / JetBrains
Continue 通过 config.yaml 管理模型(旧版为
config.json,字段同名)。打开侧边栏 → 齿轮图标 → Open Config,加入:
Continue manages models via config.yaml (older versions used
config.json with the same field names). Open the sidebar → gear icon → Open Config, and add:
name: byecore
version: 0.0.1
schema: v1
models:
- name: byecore gpt-5.4
provider: openai
model: gpt-5.4
apiBase: https://api.byecore.com/v1
apiKey: sk-你的密钥
roles:
- chat
- edit
- apply
- name: byecore gpt-5.5
provider: openai
model: gpt-5.5
apiBase: https://api.byecore.com/v1
apiKey: sk-你的密钥
roles:
- chat
byecore gpt-5.4 即可。如需自动补全
(Autocomplete),再为模型追加 autocomplete 角色。
byecore gpt-5.4 from the Continue model dropdown. For Autocomplete, add the
autocomplete role to the model as well.
Aider
终端结对编程 Terminal pair programming
Aider 是最轻量的接入方式:设置两个环境变量,启动时带上 openai/ 前缀的模型名即可。
Aider is the lightest way to connect: set two environment variables and launch with a model name prefixed by openai/.
export OPENAI_API_BASE="https://api.byecore.com/v1"
export OPENAI_API_KEY="sk-你的密钥"
aider --model openai/gpt-5.4
$env:OPENAI_API_BASE = "https://api.byecore.com/v1"
$env:OPENAI_API_KEY = "sk-你的密钥"
aider --model openai/gpt-5.4
~/.aider.conf.yml(字段
openai-api-base / openai-api-key),或加入 shell 启动文件。
~/.aider.conf.yml (fields
openai-api-base / openai-api-key) or add them to your shell startup file.
OpenCode
开源 TUI Agent Open-source TUI agent
OpenCode 通过 opencode.json 声明自定义 Provider,底层使用
@ai-sdk/openai-compatible 驱动:
OpenCode declares a custom Provider in opencode.json, driven under the hood by
@ai-sdk/openai-compatible:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"byecore": {
"npm": "@ai-sdk/openai-compatible",
"name": "byecore",
"options": {
"baseURL": "https://api.byecore.com/v1",
"apiKey": "sk-你的密钥"
},
"models": {
"gpt-5.4": { "name": "gpt-5.4" },
"gpt-5.5": { "name": "gpt-5.5" },
"gpt-5.3-codex": { "name": "gpt-5.3-codex" }
}
}
},
"model": "byecore/gpt-5.4"
}
opencode,用 /models 命令即可在 byecore 模型之间切换。项目级配置可放在仓库根目录的 opencode.json。
opencode and switch between byecore models with the /models command. Project-level config can live in an opencode.json at the repository root.
Zed
编辑器 · Agent Panel Editor · Agent Panel
Zed 在 settings.json(命令面板 → zed: open settings)中配置
OpenAI 兼容接口:
Zed configures an OpenAI-compatible endpoint in settings.json (command palette → zed: open settings):
{
"language_models": {
"openai": {
"api_url": "https://api.byecore.com/v1",
"available_models": [
{
"name": "gpt-5.4",
"display_name": "byecore · gpt-5.4",
"max_tokens": 1000000
},
{
"name": "gpt-5.5",
"display_name": "byecore · gpt-5.5",
"max_tokens": 1000000
}
]
}
}
}
byecore · gpt-5.4 即可。
byecore · gpt-5.4 from the model dropdown.
Crush
Charm 终端 Agent Charm terminal agent
Crush(charmbracelet 出品)通过 crush.json 声明 OpenAI 兼容 Provider:
Crush (by charmbracelet) declares an OpenAI-compatible Provider in crush.json:
{
"$schema": "https://charm.land/crush.json",
"providers": {
"byecore": {
"name": "byecore",
"type": "openai",
"base_url": "https://api.byecore.com/v1",
"api_key": "sk-你的密钥",
"models": [
{
"id": "gpt-5.4",
"name": "gpt-5.4",
"context_window": 1000000,
"default_max_tokens": 64000
},
{
"id": "gpt-5.5",
"name": "gpt-5.5",
"context_window": 1000000,
"default_max_tokens": 64000
}
]
}
}
}
crush 后按 Ctrl+P 打开命令面板切换模型;项目级配置可放仓库根目录的
crush.json 或 .crush.json。
crush, press Ctrl+P to open the command palette and switch models; project-level config can live in a
crush.json or .crush.json at the repository root.
Droid (Factory CLI)
BYOK 自定义模型 BYOK custom models
Factory 的 Droid CLI 支持 BYOK(Bring Your Own Key)自定义模型,把 byecore 加进
~/.factory/config.json:
Factory's Droid CLI supports BYOK (Bring Your Own Key) custom models. Add byecore to
~/.factory/config.json:
{
"custom_models": [
{
"model_display_name": "byecore gpt-5.4",
"model": "gpt-5.4",
"base_url": "https://api.byecore.com/v1",
"api_key": "sk-你的密钥",
"provider": "generic-chat-completion-api",
"max_tokens": 64000
}
]
}
droid,在模型选择器(/model)里即可看到
byecore gpt-5.4。
droid and you'll see
byecore gpt-5.4 in the model picker (/model).
桌面对话客户端
Desktop Chat Clients
测试 / 日常对话 Testing / everyday chat
桌面与 Web 端对话客户端适合快速验证 Key、对比模型输出,或承担日常问答。注意各家对
/v1 的拼接规则不同。
Desktop and web chat clients are great for quickly verifying a Key, comparing model outputs, or everyday Q&A. Note that each handles the
/v1 suffix differently.
Cherry Studio
设置 → 模型服务 → 添加提供商,类型选 OpenAI。API 地址填
https://api.byecore.com(会自动补全 /v1),填入 Key
后在「管理」中手动添加模型 gpt-5.4。
Settings → Model Providers → Add Provider, type OpenAI. Set the API address to
https://api.byecore.com (it auto-completes /v1), enter your Key,
then add the model gpt-5.4 by hand under "Manage".
API 地址: https://api.byecore.com
API 密钥: sk-你的密钥
模型: gpt-5.4
API address: https://api.byecore.com
API key: sk-your-key
Model: gpt-5.4
Chatbox
设置 → 模型提供方 → 添加自定义提供方,模式选 OpenAI API 兼容。
Settings → Model Provider → Add Custom Provider, mode OpenAI API Compatible.
API 域名: https://api.byecore.com
API 路径: /v1/chat/completions
API 密钥: sk-你的密钥
模型: gpt-5.4
API host: https://api.byecore.com
API path: /v1/chat/completions
API key: sk-your-key
Model: gpt-5.4
LobeChat
设置 → AI 服务商 → OpenAI:API Key 填你的密钥,API 代理地址填
https://api.byecore.com/v1,在模型列表中手动添加
gpt-5.4 后即可使用。
Settings → AI Provider → OpenAI: enter your Key as the API Key, set the API proxy address to
https://api.byecore.com/v1, then add
gpt-5.4 to the model list by hand.
NextChat
设置 → 自定义接口:接口地址填 https://api.byecore.com,API Key
填你的密钥,「自定义模型名」填 gpt-5.4,对话中选择该模型。
Settings → Custom Endpoint: set the endpoint to https://api.byecore.com, enter your Key as the API Key,
set "Custom Model Name" to gpt-5.4, then choose that model in chat.
https://api.byecore.com 与
https://api.byecore.com/v1 之间换一种写法重试即可。
https://api.byecore.com and
https://api.byecore.com/v1.
Image Models
图片模型使用
Using Image Models
图片模型 image-2 不在编程客户端里直接调用,统一通过独立图片站使用,前端基于
gpt_image_playground。文档站与图片站分离,方便各自独立维护。
The image model image-2 is not called directly from coding clients; it is used through a dedicated image site whose frontend is based on
gpt_image_playground. The docs site and image site are kept separate so each can be maintained independently.
独立图片站入口
Dedicated image site
直接输入提示词、选择图片模型并生成。需要控制费用时,请每次显式传入下表中的合法
size,避免兜底请求按更高规格计费。
Just type a prompt, pick an image model, and generate. To control cost, always pass an explicit valid
size from the table below, so fallback requests aren't billed at a higher tier.
| 清晰度 | Resolution | 可用 Size | Available Size | 比例 | Ratio | 消耗 | Cost |
|---|---|---|---|---|---|---|---|
| 1K | 1024x1024 |
1:1 | 0.05 | ||||
| 2K | 2048x2048 |
1:1 | 0.10 | ||||
| 2K | 1536x1024 |
3:2 | 0.10 | ||||
| 2K | 1024x1536 |
2:3 | 0.10 | ||||
| 4K | 3840x2160 |
16:9 | 0.20 | ||||
| 4K | 2160x3840 |
9:16 | 0.20 |
size 为空、传入
auto 或不支持的分辨率,系统一律按 2K(消耗 0.10)
处理。只想生成 1K 图时务必显式传 1024x1024,否则备用图也会按 2K
计费。最终扣费以后台实际计费规则为准。
size is empty, set to
auto, or an unsupported resolution, the system treats it as 2K (cost 0.10).
To generate a 1K image, always pass 1024x1024 explicitly; otherwise the fallback image is billed at 2K.
Final charges follow the backend's actual billing rules.
Health Check
连通性测试
Connectivity Test
配置完成后,建议先在终端验证:Key 是否有效(模型列表)、OpenAI 协议对话是否正常返回;使用 Claude 生态客户端的,再验证一次 Anthropic 协议端点。
Once configured, verify in the terminal first: that the Key is valid (the model list) and that OpenAI-protocol chat returns normally; if you use a Claude-ecosystem client, verify the Anthropic-protocol endpoint as well.
# 1. 验证 Key 与可用模型
curl https://api.byecore.com/v1/models \
-H "Authorization: Bearer sk-你的密钥"
# 2. 发送一条最小对话请求
curl https://api.byecore.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-你的密钥" \
-d '{
"model": "gpt-5.4",
"messages": [{ "role": "user", "content": "你好,介绍一下你自己" }]
}'
# 3.(可选)验证 Anthropic 协议端点 —— 任意模型同样可用
curl https://api.byecore.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: sk-你的密钥" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "gpt-5.4",
"max_tokens": 64,
"messages": [{ "role": "user", "content": "你好" }]
}'
# 1. Verify the Key and available models
curl https://api.byecore.com/v1/models \
-H "Authorization: Bearer sk-your-key"
# 2. Send a minimal chat request
curl https://api.byecore.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-key" \
-d '{
"model": "gpt-5.4",
"messages": [{ "role": "user", "content": "Hello, introduce yourself" }]
}'
# 3. (Optional) Verify the Anthropic-protocol endpoint — any model works too
curl https://api.byecore.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: sk-your-key" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "gpt-5.4",
"max_tokens": 64,
"messages": [{ "role": "user", "content": "Hello" }]
}'
# 1. 验证 Key 与可用模型
Invoke-RestMethod -Uri "https://api.byecore.com/v1/models" `
-Headers @{ Authorization = "Bearer sk-你的密钥" }
# 2. 发送一条最小对话请求
$body = @{
model = "gpt-5.4"
messages = @(@{ role = "user"; content = "你好" })
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "https://api.byecore.com/v1/chat/completions" `
-Method Post -ContentType "application/json" `
-Headers @{ Authorization = "Bearer sk-你的密钥" } -Body $body
# 3.(可选)验证 Anthropic 协议端点 —— 任意模型同样可用
$claude = @{
model = "gpt-5.4"
max_tokens = 64
messages = @(@{ role = "user"; content = "你好" })
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "https://api.byecore.com/v1/messages" `
-Method Post -ContentType "application/json" `
-Headers @{ "x-api-key" = "sk-你的密钥"; "anthropic-version" = "2023-06-01" } `
-Body $claude
# 1. Verify the Key and available models
Invoke-RestMethod -Uri "https://api.byecore.com/v1/models" `
-Headers @{ Authorization = "Bearer sk-your-key" }
# 2. Send a minimal chat request
$body = @{
model = "gpt-5.4"
messages = @(@{ role = "user"; content = "Hello" })
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "https://api.byecore.com/v1/chat/completions" `
-Method Post -ContentType "application/json" `
-Headers @{ Authorization = "Bearer sk-your-key" } -Body $body
# 3. (Optional) Verify the Anthropic-protocol endpoint — any model works too
$claude = @{
model = "gpt-5.4"
max_tokens = 64
messages = @(@{ role = "user"; content = "Hello" })
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "https://api.byecore.com/v1/messages" `
-Method Post -ContentType "application/json" `
-Headers @{ "x-api-key" = "sk-your-key"; "anthropic-version" = "2023-06-01" } `
-Body $claude
auth.json
等配置是否为合法 JSON、Key 前后无多余空格;② Base URL 是否多写或漏写
/v1;③ 模型名是否为控制台内实际可用的模型(可用
/v1/models 查询);④ 修改配置后是否已重启客户端。
auth.json
are valid JSON and the Key has no surrounding whitespace; ② whether the Base URL has an extra or missing
/v1; ③ whether the model name is one actually available in the Console (query with
/v1/models); ④ whether you restarted the client after editing the config.
FAQ
常见问题
Frequently Asked Questions
返回 401 / 鉴权失败怎么排查?
How do I troubleshoot a 401 / auth failure?
依次确认:Key 是否完整复制(以 sk- 开头、无多余空格或换行);请求头是否为
Authorization: Bearer sk-…(Anthropic 协议则为
x-api-key 或 ANTHROPIC_AUTH_TOKEN);Codex 用户额外检查
auth.json 是否为合法 JSON。仍失败则到控制台确认 Key 状态是否正常。
Check in order: that the Key was copied in full (starts with sk-, no stray spaces or line breaks); that the header is
Authorization: Bearer sk-… (or x-api-key / ANTHROPIC_AUTH_TOKEN for the Anthropic protocol); and, for Codex users, that
auth.json is valid JSON. If it still fails, confirm the Key's status in the Console.
返回 404 / 提示模型不存在?
Getting a 404 / "model not found"?
九成是 Base URL 拼接问题:OpenAI 协议最终请求地址必须是
https://api.byecore.com/v1/chat/completions,Claude 协议则是
https://api.byecore.com/v1/messages。会自动补
/v1 的客户端(如 Cherry Studio)只填根地址,不补的填到
/v1。其余情况检查模型名是否为控制台内实际可用的模型。
Nine times out of ten it's a Base URL issue: the final OpenAI-protocol request URL must be
https://api.byecore.com/v1/chat/completions, and the Claude-protocol one
https://api.byecore.com/v1/messages. Clients that auto-complete
/v1 (such as Cherry Studio) take only the root address; those that don't need it filled up to
/v1. Otherwise, check that the model name is one actually available in the Console.
Codex 为什么用 responses,其他客户端用 chat/completions?
Why does Codex use responses while other clients use chat/completions?
Codex CLI 原生基于 OpenAI Responses API,所以 config.toml 中声明
wire_api = "responses"。byecore 对
responses、chat/completions 与 Anthropic
messages 全部兼容;其余客户端绝大多数走
/v1/chat/completions,无需任何额外设置。
Codex CLI is built natively on the OpenAI Responses API, so config.toml declares
wire_api = "responses". byecore supports
responses, chat/completions, and Anthropic
messages alike; the vast majority of other clients use
/v1/chat/completions with no extra setup.
Claude Code 里能用 GPT 等非 Claude 模型吗?
Can I use non-Claude models like GPT inside Claude Code?
可以。byecore 网关自动完成协议转换,控制台中的任意模型都能通过 Anthropic
协议调用:直连后用
/model 模型名 切换即可。反过来,Claude 系列模型也可以通过 OpenAI
协议(/v1/chat/completions)在其他客户端中使用。
Yes. The byecore gateway handles protocol conversion, so any model in the Console can be called over the Anthropic
protocol: connect directly, then switch with
/model model-name. Conversely, Claude models can be used in other clients over the OpenAI
protocol (/v1/chat/completions).
一个 Key 可以在多个客户端同时使用吗?
Can one Key be used in multiple clients at once?
可以,Key 不限定客户端。但更推荐为每个客户端单独建 Key:用量审计更清晰,泄露时可单独吊销,互不影响。
Yes — a Key isn't tied to a specific client. Still, we recommend a separate Key per client: usage auditing is clearer, and a leaked Key can be revoked on its own without affecting the others.
如何在多个路由 / 模型之间快速切换?
How do I switch quickly between multiple routes / models?
桌面用户首选 CC Switch(GUI 一键切换并写入配置); Claude Code 需要按场景自动分流模型时用 Claude Code Router;多上游聚合需求用 LiteLLM 起本地网关,客户端零改动。
Desktop users should start with CC Switch (GUI one-click switching that writes the config); for automatic per-scenario model routing in Claude Code, use Claude Code Router; for aggregating multiple upstreams, run a local gateway with LiteLLM and keep clients unchanged.
为什么图片模型不能在 IDE / CLI 里直接用?
Why can't image models be used directly in an IDE / CLI?
图片能力目前统一收敛在独立站点 img.byecore.com (gpt_image_playground 前端),与文档站、API 路由分开维护。计费与 size 规则见 图片模型 一节。
Image capabilities are currently consolidated on the dedicated site img.byecore.com (a gpt_image_playground frontend), maintained separately from the docs site and the API routes. For billing and size rules, see the Image Models section.