Skip to content

资源分组接口 ​

资源管理接口用于管理模型可引用的素材资源。目前仅用于火山 Seedance 系列模型。

Seedance 2.0 系列模型不支持直接上传含有真人人脸的参考图/视频。为便利创作者对肖像的使用,平台推出了素材库,用户可上传真人素材至素材库并授权给模型使用。

注意:API Key 分组为"seedance三方资源通道-a"时,可直接使用人像资源创建视频,无需通过资源管理创建资源。该分组在调用视频生成接口时会自动处理人像素材,简化调用步骤。

鉴权: Authorization: Bearer <api-key>

枚举: status:1 可用 / 2 处理中 / 3 失败 / 4 已删除

创建资源分组 ​

http
POST /api/model-resources/groups

请求参数:

字段类型必填说明
namestring是分组名称
descriptionstring否分组描述

请求示例:

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/groups

Query 参数:

字段类型必填说明
pint否页码,默认 1
page_sizeint否每页数量
keywordstring否按名称或描述搜索

请求示例:

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}

请求参数:

字段类型必填说明
namestring否新分组名称
descriptionstring否新分组描述

请求示例:

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": "新的备注"
  }'