# Router One API 协议兼容性事实

Last updated: 2026-08-22

- 产品：Router One
- 类别：统一 LLM API 网关（LLM API Gateway / AI Model Router）
- 适用范围：网关在每个端点上接受哪些协议格式与请求特性、在调用任何模型之前会拒绝什么；逐模型的能力标记以目录为准，不在本页
- OpenAI 兼容 base URL：https://api.router.one/v1
- Anthropic 兼容 / Claude Code base URL：https://api.router.one
- API Key 格式：sk-rk-...；下列所有端点都以 Authorization: Bearer 方式传递

## 端点

- POST https://api.router.one/v1/chat/completions：OpenAI Chat Completions 协议格式；服务目录中的全部对话模型
- POST https://api.router.one/v1/messages：Anthropic Messages 协议格式（Claude Code 使用的路径）；服务 Claude 系列与 DeepSeek V4（deepseek-v4-pro、deepseek-v4-flash）
- POST https://api.router.one/v1/responses：OpenAI Responses 协议格式（Codex CLI 使用的路径）；GPT 系列与 DeepSeek V4 原生服务 —— 权威清单是「详情页列出 POST /v1/responses 的模型」
- POST https://api.router.one/v1/images/generations：图像生成模型（按张计价，见定价事实）
- POST https://api.router.one/v1/videos/generations 与 GET https://api.router.one/v1/videos/generations/{task_id}：视频生成模型；先提交，再按 task id 轮询
- 端点规则：从 https://router.one/zh/models 进入的每个模型详情页列出该模型实际服务的端点；https://router.one/zh/models.md 是机器可读的权威来源，优先于上面的系列简写
- 不承诺跨协议：模型只能在其详情页列出的端点上调用；Router One 不对外宣称任何协议格式之间的转换路径

## Responses API（POST /v1/responses）

- 该端点服务的所有模型均接受：文本与多部件输入、instructions、流式输出、function 工具
- 原生服务的 Responses 模型（GPT 系列、DeepSeek V4）额外接受并按该模型标准 token 费率计费：custom 工具；previous_response_id、conversation、prompt 引用；hosted 工具（file_search、code_interpreter、computer_use、mcp、web_search）；file_id 与 file_url 输入部件；全部 service_tier 取值
- hosted 工具边界：hosted 工具字段在端点上被接受并计量 —— Router One 自身不执行工具（见下方信任边界）
- 在调用任何模型之前以 HTTP 400 invalid_request 拒绝：image_generation 工具与 image_generation_call 输入项（请改用 POST /v1/images/generations），以及 background: true

## 流式、工具调用、视觉

- 流式（stream: true）、工具调用与视觉输入是目录中公开的逐模型能力标记；https://router.one/zh/models.md 是权威来源，本页不逐个列出模型
- 流式指南：https://router.one/zh/llm-streaming；工具调用指南：https://router.one/zh/llm-tool-calling

## 结构化输出（POST /v1/chat/completions）

- response_format.type = json_object 与 response_format.type = json_schema 均接受
- 信封校验在网关完成、早于任何模型调用：json_schema 请求在缺少 response_format.json_schema（"response_format.json_schema is required when response_format.type is json_schema"）、缺少 json_schema.name（"response_format.json_schema.name is required"）或缺少 json_schema.schema（"response_format.json_schema.schema is required"）时返回 HTTP 400 invalid_request；strict 与 description 可选
- 合法的 response_format 对象原样转发给模型；schema 是否被强制执行由模型决定、以模型支持为前提 —— Router One 不会按 schema 校验响应正文
- schema 方言故障转移：当某条模型线路因 $defs 或 $ref 拒绝 schema 时，网关把它视为该线路特有的 400，并故障转移到同一模型的下一条候选线路
- 指南：https://router.one/zh/llm-structured-outputs

## token 计量

- 推理 / 思考 token：思考类 / 推理类模型（例如 claude-*-thinking 变体）产生的推理输出按该模型公示的输出单价计费，并计入该请求的总 token 数；不存在单独的推理计价行（见定价事实）

## 不包含

- 网关侧响应缓存、请求正文留存，以及上述端点行之外的任何协议格式转换
- 信任边界：Router One 负责模型调用、路由、计费与可观测；它不是 agent 编排运行时、工作流引擎、工具执行器、向量数据库或应用框架

## 规范页面

- OpenAI 兼容 API：https://router.one/zh/openai-compatible-api
- Codex CLI 与 Responses API：https://router.one/zh/codex-responses-api
- 工具调用：https://router.one/zh/llm-tool-calling
- 流式输出：https://router.one/zh/llm-streaming
- 结构化输出：https://router.one/zh/llm-structured-outputs
- 文档：https://router.one/zh/docs（markdown：https://router.one/zh/docs.md）
- 模型目录：https://router.one/zh/models（markdown：https://router.one/zh/models.md）
- 集成事实：https://router.one/zh/facts/integrations.md
- 定价事实：https://router.one/zh/facts/pricing.md
- 公司事实：https://router.one/zh/facts/company.md
