资源分组接口
资源管理接口用于管理模型可引用的素材资源,方便用户复用素材。目前仅用于火山 Seedance 系列模型。
注意:某些API key资源分组不支持资源管理,参见Seedance。
注意:由于素材和创建视频所在的分组API Key需要一致,所以要使用资源管理功能时,创建API Key时请指定具体分组。
鉴权:
Authorization: Bearer <api-key>枚举:
status:1可用 /2处理中 /3失败 /4已删除
创建资源分组
http
POST /api/model-resources/groups请求参数:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 是 | 分组名称 |
description | string | 否 | 分组描述 |
请求示例:
bash
curl --location 'https://neolink.com/api/api/model-resources/groups' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "用户组1",
"description": "这是备注"
}'返回示例:
json
{
"success": true,
"message": "",
"data": {
"id": 8,
"name": "用户组1",
"description": "这是备注",
"busi_type": 1,
"created_at": 1779330365,
"updated_at": 1779330365,
"deleted_at": null
}
}查询资源分组列表
http
GET /api/model-resources/groupsQuery 参数:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
p | int | 否 | 页码,默认 1 |
page_size | int | 否 | 每页数量 |
keyword | string | 否 | 按名称或描述搜索 |
请求示例:
bash
curl --location 'https://neolink.com/api/api/model-resources/groups?p=1&page_size=20' \
--header 'Authorization: Bearer <api-key>'返回示例:
json
{
"success": true,
"message": "",
"data": {
"page": 1,
"page_size": 20,
"total": 1,
"items": [
{
"id": 8,
"name": "用户组1",
"description": "这是备注",
"busi_type": 1,
"created_at": 1779330365,
"updated_at": 1779330365,
"deleted_at": null
}
]
}
}查询资源分组详情
http
GET /api/model-resources/groups/{id}请求示例:
bash
curl --location 'https://neolink.com/api/api/model-resources/groups/8' \
--header 'Authorization: Bearer <api-key>'返回字段同创建资源分组。
更新资源分组
http
PATCH /api/model-resources/groups/{id}
PUT /api/model-resources/groups/{id}请求参数:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 否 | 新分组名称 |
description | string | 否 | 新分组描述 |
请求示例:
bash
curl --location --request PATCH 'https://neolink.com/api/api/model-resources/groups/8' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "用户组1-更新",
"description": "新的备注"
}'