generate 文生视频
开发中
POST
/api/video/runway/pro/generate
提示
目前GEN-3仅支持16:9或9:16画面的视频(不管文生视频还是图生视频)
这里是一个简单的GEN-3文生视频传值示例:
请求参数
Query 参数
string
可选
Header 参数
Authorization
string
可选
示例值:
Bh3oi26r1FPFCMrJ59RKngSXB2
string
可选
Body 参数application/json
callback_url
string
回调地址
ratio
string
画面尺寸
prompt
string
描述词
style
string
风格
model
enum<string>
模型
枚举值:
gen2gen3gen4
options
object
参数
motion_vector
object
镜头控制
seconds
integer
视频时长
示例
{
"callback_url": "http://baidu.com",
"ratio": "16:9",
"prompt": "一只小猫",
"style": "cinematic",
"model": "gen3",
"options": {
"seconds": 10,
"motion_vector": {
"x": 0,
"y": 0.3999999999999999,
"z": 0,
"r": -6,
"bg_x_pan": 0,
"bg_y_pan": 0
}
}
}
示例代码
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/runway/pro/generate' \
--header 'Authorization: Bh3oi26r1FPFCMrJ59RKngSXB2' \
--header 'Content-Type: application/json' \
--data-raw '{
"callback_url": "http://baidu.com",
"ratio": "16:9",
"prompt": "一只小猫",
"style": "cinematic",
"model": "gen3",
"options": {
"seconds": 10,
"motion_vector": {
"x": 0,
"y": 0.3999999999999999,
"z": 0,
"r": -6,
"bg_x_pan": 0,
"bg_y_pan": 0
}
}
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
task_id
string
任务ID
exec_time
number
必需
ip
string
必需
示例
{
"code": 200,
"msg": "成功",
"data": {
"task_id": "0ab3bfe2-be23-4635-8c35-890fb2c1732d"
},
"exec_time": 0.67573,
"ip": "171.214.61.54"
}
修改于 2025-04-09 01:55:02