generate 文生视频
开发中
POST
/api/video/pix/generate
请求参数
Query 参数
string
可选
Header 参数
Authorization
string
鉴权密钥
示例值:
Bh3oi26r1FPFCMrJ59RKngSXB2
string
可选
Body 参数application/json
key
string
必需
callback_url
string
必需
prompt
string
必需
ratio
string
默认16:9
style
string
必需
seed
integer
可选
negative_prompt
string
可选
model
string
模型
template_id
integer
特效模板ID
sound_effect_switch
integer
音效
sound_effect_content
string
音效提示词
lip_sync_tts_speaker_id
string
人声
lip_sync_tts_content
string
人声台词
示例
{
"callback_url": "http://baidu.com",
"prompt": "make fading wind waving entire necromancer panning slow motion with bioluminescent spirits rotating around itself",
"ratio": "16:9",
"style": "realistic",
"seed": 625371600,
"negative_prompt": "ugly",
"model": "v3",
"template_id": 303624537709312,
"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 'Authorization: Bh3oi26r1FPFCMrJ59RKngSXB2' \
--header 'Content-Type: application/json' \
--data-raw '{
"callback_url": "http://baidu.com",
"prompt": "make fading wind waving entire necromancer panning slow motion with bioluminescent spirits rotating around itself",
"ratio": "16:9",
"style": "realistic",
"seed": 625371600,
"negative_prompt": "ugly",
"model": "v3",
"template_id": 303624537709312,
"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": "0882ed17-d100-49fc-95be-216056c3dee6"
},
"exec_time": 0.026768,
"ip": "118.120.152.227"
}
修改于 2025-04-16 02:40:28