资源分组接口
资源管理接口用于管理模型可引用的素材资源。目前仅用于火山 Seedance 系列模型。
Seedance 2.0 系列模型不支持直接上传含有真人人脸的参考图/视频。为便利创作者对肖像的使用,平台推出了素材库,用户可上传真人素材至素材库并授权给模型使用。
注意:API Key 分组为"seedance三方资源通道-a"时,可直接使用人像资源创建视频,无需通过资源管理创建资源。该分组在调用视频生成接口时会自动处理人像素材,简化调用步骤。
鉴权:
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": "新的备注"
}'