创建视频任务(文生视频、图生视频、视频生视频
POST
{{BASE_URL}}/runway/tasks关键字段说明
参考图片、参考视频都需要通过上传接口上传后,使用返回的链接,携带在提交任务下
字段 类型 说明
taskType string 版本值 gen2、 europa 版本为 gen3 , gen3a_turbo 版本为 gen3 turbo
notify_hook string 回调url 回调的格式 就是 返回体
options.seconds int 时长
options.gen2Options.seed int 种子
options.gen2Options.text_prompt string 提示词
options.gen2Options.image_prompt string 参考图片 需要通过上传接口得到的图片链接 如果没有必须把字段删除
options.gen2Options.image_prompt string 参考图片 需要通过上传接口得到的图片链接 如果没有必须把字段删除
options.exploreMode boolean true 为runway-gen3, false 为runway-gen3-fast
options.init_image string 参考图片 需要通过上传接口得到的图片链接 如果没有必须把字段删除 gen3 turbo 必须带图或者视频
options.video_prompt string 参考视频 需要通过上传接口得到的视频链接 如果没有必须把字段删除 gen3 turbo 必须带图或者视频
视频大小仅支持设置横屏或竖屏
"width": 1280,
"height": 768,
或者
"width": 768,
"height": 1280,
请求参数
创建视频任务.gen2
{
"taskType": "gen2",
"internal": false,
"options": {
"name": "Gen-2 1675247627, An older man playing, y3jpg, M 5",
"seconds": 4,
"gen2Options": {
"mode": "gen2",
"seed": 1675247627,
"interpolate": true,
"upscale": false,
"watermark": true,
"motion_score": 22,
"use_motion_score": true,
"use_motion_vectors": false,
"text_prompt": "An older man playing piano, lit from the side.",
"image_prompt": "https://url.com 如果留空必须把字段删除",
"init_image": "https://url.com 如果留空必须把字段删除"
},
"exploreMode": false,
"assetGroupName": "Generative Video"
}
,"notify_hook":""
}
创建视频任务.gen3
{
"taskType": "europa",
"internal": false,
"options": {
"name": "Gen-3 Alpha 2275386909",
"seconds": 5,
"text_prompt": "Handheld camera moving fast, flashlight light, in a white old wall in a old alley at night a black graffiti that spells ‘openai-hk’",
"seed": 2275386909,
"exploreMode": true,
"watermark": false,
"enhance_prompt": true,
"width": 1280,
"height": 768,
"assetGroupName": "Generative Video",
"init_image": "通过上传接口获得的图片链接 https开头,如果没有必须把字段删除",
"resolution": "720p",
"image_as_end_frame": false
}
,"notify_hook":""
}
2.用视频创建视频任务.gen3
{
"taskType": "europa",
"internal": false,
"options": {
"name": "Gen-3 Alpha 3370505664",
"seconds": 10,
"text_prompt": "美女舞蹈",
"seed": 3370505664,
"exploreMode": true,
"watermark": false,
"enhance_prompt": true,
"video_prompt": "https://d2jqrm6oza8nb6.cloudfront.net/previews/bf87aed7-1bb4-4d5c-b53d-bd1d948d9720.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNTgyMjcxNGYzM2Q2ZDM2ZSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyOTk4NzIwMH0.pRuWeQd6sD-1EkF15oUr21FMwjsOs011Nekep-mSTfg",
"structure_transformation": 0.3,
"width": 1280,
"height": 768,
"assetGroupName": "Generative Video"
}
}
示例代码
返回响应
{
"task": {
"id": "fc4a68aa-4280-42cb-b55c-e1d9a64960e0",
"name": "Gen-2 1675247627, An older man playing, y3jpg, M 5",
"image": null,
"createdAt": "2024-07-26T16:40:43.864Z",
"updatedAt": "2024-07-26T16:40:43.894Z",
"taskType": "gen2",
"options": {
"name": "Gen-2 1675247627, An older man playing, y3jpg, M 5",
"seconds": 4,
"gen2Options": {
"mode": "gen2",
"seed": 1675247627,
"interpolate": true,
"upscale": false,
"watermark": true,
"motion_score": 22,
"use_motion_score": true,
"use_motion_vectors": false,
"text_prompt": "An older man playing piano, lit from the side.",
"image_prompt": "https://d2jqrm6oza8nb6.cloudfront.net/previews/8bbcaa07-509e-467e-af6e-1fa8f21bff3f.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNGExOWNhOTE3M2FlMGM5NSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyMjEyNDgwMH0.EajrIuHWvNutCTsT6moNFO8PBhCUiYj7H5KF2E3WwOc",
"init_image": "https://d2jqrm6oza8nb6.cloudfront.net/previews/8bbcaa07-509e-467e-af6e-1fa8f21bff3f.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNGExOWNhOTE3M2FlMGM5NSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyMjEyNDgwMH0.EajrIuHWvNutCTsT6moNFO8PBhCUiYj7H5KF2E3WwOc"
},
"exploreMode": false,
"assetGroupName": "Generative Video",
"recordingEnabled": true
},
"status": "PENDING",
"error": null,
"progressText": null,
"progressRatio": null,
"estimatedTimeToStartSeconds": 2.526315789473684,
"artifacts": [],
"sharedAsset": null
}
}