Models
列出可用模型
列出当前 API Key 可调用的模型。OpenAI 兼容客户端与编码 CLI(Codex CLI、Claude Code)每个会话会拉取一次。`data` 中每一项都带有请求时要填的模型 `id`,以及能力、上下文窗口与牌价字段;额外的 `models` 数组重复同一份目录,附带 Codex CLI 使用的字段。响应带 `ETag`——回传 `If-None-Match`,目录未变时返回 `304 Not Modified` 且无响应体。模型 ID 区分大小写,请从响应或模型目录复制。
AuthorizationBearer <token>
使用 API Key 进行认证。在 Router One 控制台获取你的 API Key,格式为 sk-xxx。
In: header
Header Parameters
If-None-Match?string
上一次响应返回的 ETag。匹配时返回 304 Not Modified。
Response Body
application/json
application/json
curl -X GET "https://api.router.one/v1/models"{
"object": "list",
"data": [
{
"id": "anthropic/claude-sonnet-5",
"object": "model",
"capabilities": [
"chat",
"streaming",
"tool_calling",
"vision"
],
"max_tokens": 1048576,
"max_output_tokens": 8192,
"category": "text",
"pricing_mode": "token"
},
{
"id": "deepseek-v4-flash",
"object": "model",
"capabilities": [
"chat",
"streaming",
"tool_calling"
],
"max_tokens": 1000000,
"category": "text",
"pricing_mode": "token"
}
]
}Empty
{
"error": {
"message": "invalid api key",
"type": "authentication_error",
"code": "AUTH_INVALID_API_KEY",
"request_id": "290dd478f91d8aec68f7535e871376eb"
}
}