docs: add GET /v1/models/catelog endpoint to API docs

This commit is contained in:
yumoqing 2026-06-02 11:21:30 +08:00
parent 398e90fa17
commit aa2c553ff0
2 changed files with 96 additions and 0 deletions

View File

@ -505,6 +505,49 @@ data: [DONE]`
}`
}
]
},
{
id: "models-catelog",
method: "GET",
path: "/llmage/v1/models/catelog",
title: "分类模型列表",
desc: "按分类目录获取可用模型列表可排除指定模型。仅返回已上架published状态的模型。与 /v1/models 的区别:此接口返回模型的完整信息(含供应商、上位应用等),/v1/models 返回 OpenAI 兼容的精简格式。",
params: [
{ section: "必填参数", rows: [
{ name: "catelogid", type: "string", required: true, desc: "目录类型ID如 t2t, t2v, t2i 等" }
]},
{ section: "可选参数", rows: [
{ name: "exclude_id", type: "string", required: false, desc: "排除指定模型ID常用于\"相关推荐\"场景)" }
]}
],
requestExample: {
lang: "bash",
code: `GET /llmage/v1/models/catelog?catelogid=t2t
GET /llmage/v1/models/catelog?catelogid=t2v&exclude_id=abc123`
},
responseExamples: [
{
title: "响应示例",
lang: "json",
code: `{
"total": 5,
"rows": [
{
"id": "xxx",
"name": "qwen3-max",
"model": "qwen3-max",
"description": "{...}",
"providerid": "...",
"upappid": "...",
"status": "published"
}
]
}`
}
],
errors: [
{ code: "400", desc: "缺少 catelogid 参数" }
]
}
]
},

View File

@ -588,6 +588,59 @@ GET /llmage/v1/models
---
## GET /v1/models/catelog
按分类目录获取可用模型列表可排除指定模型。仅返回已上架published状态的模型。
### 必填参数
| 参数 | 类型 | 说明 |
|------|------|------|
| `catelogid` | string | 目录类型ID`"t2t"`, `"t2v"`, `"t2i"` 等 |
### 可选参数
| 参数 | 类型 | 说明 |
|------|------|------|
| `exclude_id` | string | 排除指定模型ID常用于"相关推荐"场景) |
### 请求示例
```
GET /llmage/v1/models/catelog?catelogid=t2t
GET /llmage/v1/models/catelog?catelogid=t2v&exclude_id=abc123
```
### 响应格式
```json
{
"total": 5,
"rows": [
{
"id": "xxx",
"name": "qwen3-max",
"model": "qwen3-max",
"description": "{...}",
"providerid": "...",
"upappid": "...",
"status": "published",
...
}
]
}
```
> 与 `/v1/models` 的区别:此接口返回模型的完整信息(含供应商、上位应用等),`/v1/models` 返回 OpenAI 兼容的精简格式。
### 错误响应
| 状态码 | 说明 |
|--------|------|
| 400 | 缺少 catelogid 参数 |
---
## 通用说明
### catelogid 目录类型ID对照表