generate 图生视频
开发中
POST
/api/video/pix/generate
请求参数
Body 参数application/json
key
string
必需
callback_url
string
必需
prompt
string
必需
image
string
必需
model
string
模型
template_id
integer
特效模板ID
motion_strength
number
已废弃
motion_scale
object
已废弃
horizontal
number
已废弃
vertical
number
已废弃
roll
integer
已废弃
zoom
number
已废弃
seed
integer
可选
last_image
string
尾帧
sound_effect_switch
integer
音效
sound_effect_content
string
音效提示词
lip_sync_tts_speaker_id
string
人声ID
lip_sync_tts_content
string
人声台词
示例
{
"key": "Bh3oi26r1FPFCMrJ59RKngSXB2",
"callback_url": "http://baidu.com",
"prompt": "让图中的人变身毒液",
"image": "https://db.xiaohuhd.com/1.jpeg",
"last_image": "https://cdn3.duomiapi.com/attachments/video//20250416/db377bfd6d580802de79a449c1854601.jpeg?imageView2/2/w/1500",
"model": "v3",
"template_id": 303624537709312,
"motion_strength": 0.55,
"motion_scale": {
"horizontal": -3.3,
"vertical": 2.7,
"roll": 4,
"zoom": -4.4
},
"seed": 625371600,
"sound_effect_switch": 1,
"sound_effect_content": "海浪",
"lip_sync_tts_speaker_id": "Auto",
"lip_sync_tts_content": "海浪敲打岸边"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://duomiapi.com/api/video/pix/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "Bh3oi26r1FPFCMrJ59RKngSXB2",
"callback_url": "http://baidu.com",
"prompt": "让图中的人变身毒液",
"image": "https://db.xiaohuhd.com/1.jpeg",
"last_image": "https://cdn3.duomiapi.com/attachments/video//20250416/db377bfd6d580802de79a449c1854601.jpeg?imageView2/2/w/1500",
"model": "v3",
"template_id": 303624537709312,
"motion_strength": 0.55,
"motion_scale": {
"horizontal": -3.3,
"vertical": 2.7,
"roll": 4,
"zoom": -4.4
},
"seed": 625371600,
"sound_effect_switch": 1,
"sound_effect_content":"海浪",
"lip_sync_tts_speaker_id": "Auto",
"lip_sync_tts_content":"海浪敲打岸边"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
task_id
string
必需
exec_time
number
必需
ip
string
必需
示例
{
"code": 200,
"msg": "成功",
"data": {
"task_id": "d0e9775e-48d2-439d-bfe8-3e19fa9933a2"
},
"exec_time": 0.025879,
"ip": "118.120.152.227"
}
修改于 2025-04-16 03:36:26