获取当前账号可用于 Forward Template 和 Identity Config 的模型。
GET /api/v1/forward/models
该接口返回当前账号可用的已启用模型。创建或更新 Template,或者覆盖 Identity Config 的模型时,可使用返回的 id、efforts 和上下文窗口信息。
请求头
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT 或 admin SAT>。Identity 级 SAT 不能调用该接口。 |
查询参数
该接口当前没有查询参数,也不支持分页。
示例请求
示例响应
HTTP 200 OK
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data | array | 当前账号可用的 Model 对象数组。 |
| has_more | boolean | 固定为 false;模型列表当前不分页。 |
data 中每个 Model 对象包含:
| 字段 | 类型 | 说明 |
|---|---|---|
| id | string | 模型标识,可用于 Template 或 Identity Config 的 model 字段。 |
| display_name | string | 面向用户展示的模型名称。 |
| is_enabled | boolean | 模型是否启用;该列表只返回已启用模型。 |
| is_new | boolean | 是否标记为新模型。 |
| is_vl | boolean | 是否支持视觉或图片输入。 |
| support_disable_reasoning | boolean | 是否支持关闭 reasoning。 |
| price_factor | number | 可选,相对价格倍率。 |
| efforts | string[] | 可选,支持的 reasoning effort 等级。 |
| default_effort | string | 可选,默认 reasoning effort 等级。 |
| speed | string[] | 可选,支持的推理速度,例如 standard、high;省略时表示仅支持标准速度。 |
| max_input_tokens | integer | 可选,模型支持的最大输入上下文(token 数)。 |
| default_context_window | integer | 可选,未指定 model.context_window 时使用的默认上下文窗口(token 数)。 |
| available_context_windows | integer[] | 可选,model.context_window 可选择的上下文窗口档位(token 数)。 |
错误
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 401 | authentication_error | - | PAT 或 admin SAT 无效、已过期,或直接使用了 Service Account Key。 |
| 403 | permission_error | - | 使用 Identity 级 SAT 调用管理接口。 |
| 503 | api_error | - | 模型目录暂时不可用。 |
备注
- 只使用当前响应中返回的模型 ID;不同账号可见的模型可能不同。
speed当前仅用于描述模型能力;Forward Template 和 Identity Config 的model对象只接受id、effort和context_window。GET /api/v2/forward/models不可用,请使用 v1 路径。- 响应不包含内部路由、默认模型或促销配置等非公开字段。