OAI Route 接入
- 适用于用 New API 搭建中转站、以 OAIRoute 为上游的下游
- 按顺序完成五步:搭建站点、创建 Key、添加渠道、设置价格、开放给客户
第一步:搭建 New API 站点
If you already run New API, skip to step 2.
Otherwise, deploy it by following the New API docs. Pick one method:
For the full guide, see Installation & Deployment in the New API docs.
第二步:在 api 站创建 Key
到 api 站 注册账号并创建 Key。api 站的账号、Key 和余额与 ark 站分开,两边不通用。
Sign up on the api site and create a key there. The api site has its own accounts, keys, and balances, separate from the ark site.
第三步:添加 OAIRoute 渠道
在你的 New API 后台打开「渠道」,新建渠道。按模型选渠道类型,一类模型建一个渠道:
| 模型 | 渠道类型 |
|---|---|
| GPT 等 OpenAI 格式的模型 | OpenAI |
| Claude | Anthropic |
| Gemini | Gemini |
另外两个字段三个渠道都一样:
| 字段 | 填写 |
|---|---|
| API 地址 | https://api.oairoute.com |
| 密钥 | 第二步创建的 Key |
地址只填域名,不要加 /v1 或其他后缀。
渠道表单里其他字段的说明见 New API 文档 渠道。
In your New API admin panel, open Channels and create a channel. Pick the channel type by model, one channel per model family:
| Models | Channel type |
|---|---|
| GPT and other OpenAI-format models | OpenAI |
| Claude | Anthropic |
| Gemini | Gemini |
The other two fields are the same for all three channels:
| Field | Value |
|---|---|
| Base URL | https://api.oairoute.com |
| Key | The key from step 2 |
Enter the domain only. Do not add /v1 or any other path.
For the other fields in the channel form, see Channels in the New API docs.
第四步:设置价格
New API 按倍率计费,在后台给每个模型设置倍率,方法见 New API 文档 倍率设置。
New API bills by ratio. Set a ratio for each model in your admin panel. See Ratio Settings in the New API docs.
第五步:开放给你的客户
Create tokens for your customers. See API Tokens in the New API docs.
Your customers can use API Reference in the New API docs.