Asset Management

上传素材

使用 `POST /v1/seedance/asset/CreateAsset` 将公网素材导入 Seedance 素材库。

POSThttps://duoyuanx.com/v1/seedance/asset/CreateAsset
请求示例
curl -X POST https://duoyuanx.com/v1/seedance/asset/CreateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '
{
  "GroupId": "group-xxx",
  "URL": "https://example.com/reference.webp",
  "AssetType": "Image",
  "Name": "child"
}'
响应示例
{
  "state": 1,
  "data": {
    "Id": "asset-xxx",
    "task_id": "task_xxx"
  },
  "error": null
}

在指定素材组中导入素材。URL 用于把公网 HTTPS 资源拉取进素材库(审核/转码由服务端完成)。导入成功后返回 AssetId,在 创建视频 中推荐用 asset://{assetId} 引用,而不是重复填写公网 URL。

请求头

Authorizationstring必填

请求身份认证。使用 Bearer Token,示例值:Bearer YOUR_API_KEY。

Content-Typestring必填

请求内容类型,必须设置为 application/json。

请求体

GroupIdstring必填

素材组 ID,来自 创建素材组 返回的 data.Id。

URLstring必填

待导入素材的公网 HTTPS 地址。

AssetTypestring必填

素材类型:Image、Video、Audio。

Namestring必填

素材名称。

请求示例

响应示例

素材处理为异步流程,请用返回的 task_id 调用 查询素材,待 Status 为 Active 后再用于视频生成。

响应字段

stateinteger

业务状态码。

dataobject

业务数据。

Idstring

素材 ID,视频生成时可写为 asset://{Id}。

task_idstring

导入任务 ID,用于 查询素材。

errorobject | null

错误信息。

相关页面