Skip to content
EN

generate(文生视频

方法: POST路径: /runway/v1/pro/generate

gen-3仅支持16:9和9:16,图生视频也要传比例,不传默认16:9,枚举值16:9,9:16,1:1,4:3,3:4,21:9

请求参数

Header 参数

text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}

Body 参数 application/json

text
ratio
enum<string>
画面尺寸
必需
gen-3仅支持16:9和9:16,图生视频也要传比例,不传默认16:9,枚举值16:9,9:16,1:1,4:3,3:4,21:9
枚举值:
16:9
9:16
1:1
4:3
3:4
21:9
prompt
string
描述词
必需
style
string
风格
必需
请看style 列表文档
model
enum<string>
模型
必需
枚举值:
gen2
gen3
gen4
image
string
可选
选填,不传则是文生视频
options
object
必需
seconds
enum<integer>
视频时长
必需
目前仅支持gen-3、4;传5或10
枚举值:
5
10
motion_vector
object
镜头控制
必需
目前仅支持gen-2
callback_url
string
必需
示例
{
"ratio"
:
"16:9"
,
"prompt"
:
"string"
,
"style"
:
"string"
,
"model"
:
"gen2"
,
"image"
:
"string"
,
"options"
:
{
"seconds"
:
5
,
"motion_vector"
:
{
"x"
:
0
,
"y"
:
0
,
"z"
:
0
,
"r"
:
0
,
"bg_x_pan"
:
0
,
"bg_y_pan"
:
0
}
}
,
"callback_url"
:
"string"
}

请求示例代码

Shell

bash
curl --location --request POST '/runway/v1/pro/generate' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "ratio": "16:9",
    "prompt": "string",
    "style": "string",
    "model": "gen2",
    "image": "string",
    "options": {
        "seconds": 5,
        "motion_vector": {
            "x": 0,
            "y": 0,
            "z": 0,
            "r": 0,
            "bg_x_pan": 0,
            "bg_y_pan": 0
        }
    },
    "callback_url": "string"
}'

返回响应

🟢 200 成功

内容类型: application/json

响应结构

text
object

示例

json
{}