将公网图片 / 视频 / 音频登记为可复用素材,拿到 asset_url后可在视频生成任务中作为首帧、参考图、参考视频或参考音频使用。
| 模型 | 说明 |
|---|---|
seedance-2.0 | seedance 2.0(火山),目标视频4K |
model填后续要使用该素材的目标视频模型名。
| 项 | 值 |
|---|---|
| 请求方法 | POST |
| 请求地址 | https://api.aiyxgaw.com/v1/assets/uploads |
| 认证 | Header Authorization: Bearer YOUR_API_KEY |
| 请求格式 | Content-Type: application/json |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
url | string | ✓ | 单个素材的公网 HTTP/HTTPS URL,与 urls 二选一 |
urls | array | ✗ | 多个素材的公网 HTTP/HTTPS URL,最多 20 个 |
model | string | ✓ | 目标视频模型名,见上方模型列表 |
mode | string | ✓ | 固定填 asset |
type | string | ✓ | 素材类型:image / video / audio |
role | string | ✓ | 素材角色:reference_image / reference_video / reference_audio,与 type 对应 |
subject_type | string | ✓ | 固定填 person |
purpose | string | ✓ | 固定填 person_reference |
type 与 role 对应关系:type | role |
|---|---|
image | reference_image |
video | reference_video |
audio | reference_audio |
object=asset),多个 URL 返回列表(object=list)。核心字段如下:{
"object": "asset",
"asset_id": "s4ka_EXAMPLE",
"asset_url": "asset://s4ka_EXAMPLE",
"asset_type": "Image",
"status": "ready",
"model": "seedance-2.0",
"mode": "asset",
"purpose": "person_reference",
"visibility": "private",
"content": {
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "asset://s4ka_EXAMPLE"
}
}
}| 字段 | 说明 |
|---|---|
object | asset 为单个素材,list 为多个素材 |
asset_id | 素材 ID(平台素材ID) |
asset_url | 素材引用地址,格式 asset://s4ka_...,后续视频任务中引用素材用这个 |
asset_type | 素材类型:Image / Video / Audio |
status | 素材状态,ready 表示可用 |
model | 素材绑定的模型名 |
source_url | 原始素材 URL |
content | 可直接放进视频任务 content 数组的素材片段(已整理为视频接口接受的type、role和url字段) |
visibility | 可见范围,private |
url 与 urls 二选一,urls 最多 20 个。type 与 role 需一一对应(image ↔ reference_image 等)。mode、subject_type、purpose 为固定值,照填即可。status 为 ready 后再在视频任务中引用 asset_url。| HTTP | 说明 |
|---|---|
| 400 | 请求参数不合法 |
| 401 | 令牌缺失或无效 |
| 413 | 请求体过大 |