特效视频
更新时间:2025-01-23
本接口用于创建场景特效任务
注意事项:
- 图片尺寸大小格式有限制,图片大小小于50M,格式只支持 JPG/JPEG/PNG, 图片长宽比需要小于1:4或者4:1
- 图片 URL 需要确保公网可访问
- 分辨率 512 对应清晰度为 360p,720p 对应清晰度为 720p,1080p 对应清晰度为 1080p
图片上传流程:
操作指南:
- 不同特效有不同的使用指南和限制,具体请查看文档 特效视频使用指南
请求结构
POST /v2/aigc/create_effect_video HTTP/1.1
connection: keep-alive
host: vod.bj.baidubce.com
content-type: application/json
x-bce-request-id: <bce-request-id>
x-bce-date: <utc-date-string>
authorization: <bce-authorization-string>
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数 | 类型 | 是否必需 | 描述 |
---|---|---|---|
model | string | 是 | 模型名称, 支持:
|
modelVTaskInput | EffectVideoVTaskInput | 否 | V 模型的特定输入参数 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数 | 类型 | 描述 |
---|---|---|
taskId | string | 任务id |
请求示例
生成拥抱特效场景
请求内容
POST /v2/aigc/create_effect_video HTTP/1.1
host: vod.bj.baidubce.com
accept: */*
connection: keep-alive
content-type: application/json
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
x-bce-date: 2024-03-24T13:08:44Z
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2024-03-24T13:08:44Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
{
"model": "V",
"modelVTaskInput": {
"effect": "hug",
"images": [
{
"imageUrl": "https://vod-resource.cdn.bcebos.com/videos/hug.png"
}
]
}
}
生成换发特效场景
请求内容
POST /v2/aigc/create_effect_video HTTP/1.1
host: vod.bj.baidubce.com
accept: */*
connection: keep-alive
content-type: application/json
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
x-bce-date: 2024-03-24T13:08:44Z
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2024-03-24T13:08:44Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
{
"model": "V",
"modelVTaskInput": {
"effect": "hair_swap_twin_tails",
"images": [
{
"imageUrl": "https://vod-resource.cdn.bcebos.com/videos/hair_swap_twin_tails_1.jpeg"
}
],
"hairSwapInput": {
"hairColor": "Sweet Cherry Pink"
}
}
}
生成财神发金币特效场景
请求内容
POST /v2/aigc/create_effect_video HTTP/1.1
host: vod.bj.baidubce.com
accept: */*
connection: keep-alive
content-type: application/json
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
x-bce-date: 2024-03-24T13:08:44Z
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2024-03-24T13:08:44Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
{
"model": "V",
"modelVTaskInput": {
"effect": "wish_sender_coin_rain",
"images": [
{
"imageUrl": "https://vod-resource.cdn.bcebos.com/videos/wish_sender_coin_rain_1.jpeg"
},
{
"imageUrl": "https://vod-resource.cdn.bcebos.com/videos/wish_sender_coin_rain_2.png"
},
{
"imageUrl": "https://vod-resource.cdn.bcebos.com/videos/wish_sender_coin_rain_3.png"
}
]
}
}
生成古风换装特效场景
请求内容
POST /v2/aigc/create_effect_video HTTP/1.1
host: vod.bj.baidubce.com
accept: */*
connection: keep-alive
content-type: application/json
x-bce-request-id: 6bae5cb3-97d1-4b1a-b8b6-0ad577c1d481
x-bce-date: 2024-03-24T13:08:44Z
authorization: bce-auth-v1/46bd9968a6194b4bbdf0341f2286ccce/2024-03-24T13:08:44Z/1800/host;x-bce-date/7e21c9cf1e4e2cc6921a407a388fe98df122c53b9f509043d841be76eb09a1f9
{
"model": "V",
"modelVTaskInput": {
"effect": "dynasty_dress_swap",
"aspectRatio": "9:16",
"images": [
{
"imageUrl": "https://vod-resource.cdn.bcebos.com/videos/dynasty_dress_swap.png"
}
]
}
}