- 前言(必读)
- OpenAI官方库使用教程
- 聊天模型(Chat)
- 向量嵌入
- 音频模型(Audio)
- 绘画模型(Painting)
- 音乐创作(suno)
- 视频模型(Video)
- 更多接口开 发中...
任务:拓展视频
POST
/runway/tasks
请求参数
Body 参数application/json
taskType
string
版本
internal
boolean
可选
options
object
必需
name
string
可选
seconds
enum<integer>
视频时长
枚举值:
510
示例值:
5
text_prompt
string
提示词
seed
integer
种子
exploreMode
boolean
可选
true
gen3模式false
gen3 fast模式watermark
boolean
可选
enhance_prompt
boolean
可选
width
integer
可选
height
integer
可选
assetGroupName
string
可选
init_image
string
参考图片
gen3 turbo
模式必须携带该参数resolution
string
可选
extended_from_task_id
string
拓展的任务ID
init_video
string
被扩展的视频链接
示例
{
"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",
"extended_from_task_id": "7748161e-adea-42e6-8480-0adddb149706",
"init_video": "https://dnznrvs05pmza.cloudfront.net/2e7681cd-0028-4458-8bca-515987575ec2.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiN2NiOGNmYmJlOWZmN2IzNiIsImJ1Y2tldCI6InJ1bndheS10YXNrLWFydGlmYWN0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyNTU4MDgwMH0.qQJNR5NUjR7C2KCbAI6fZ6LqD4DENRaLm6KOJLiJWRw"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/runway/tasks' \
--header 'Content-Type: application/json' \
--data-raw '{
"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",
"extended_from_task_id": "7748161e-adea-42e6-8480-0adddb149706",
"init_video": "https://dnznrvs05pmza.cloudfront.net/2e7681cd-0028-4458-8bca-515987575ec2.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiN2NiOGNmYmJlOWZmN2IzNiIsImJ1Y2tldCI6InJ1bndheS10YXNrLWFydGlmYWN0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyNTU4MDgwMH0.qQJNR5NUjR7C2KCbAI6fZ6LqD4DENRaLm6KOJLiJWRw"
}
}'
返回响应
🟢200成功
application/json
Body
task
object
必需
id
string
必需
name
string
必需
image
null
必需
createdAt
string
必需
updatedAt
string
必需
taskType
string
必需
options
object
必需
status
string
必需
error
null
必需
progressText
null
必需
progressRatio
null
必需
estimatedTimeToStartSeconds
number
必需
artifacts
array[string]
必需
sharedAsset
null
必需
示例
{
"task": {
"id": "3320e8b1-dc89-41b5-ba1e-0452ae8055e0",
"name": "Gen-3 Alpha 3914885184",
"image": null,
"createdAt": "2024-07-27T01:16:12.096Z",
"updatedAt": "2024-07-27T01:16:12.140Z",
"taskType": "gen3a",
"options": {
"name": "Gen-3 Alpha 3914885184",
"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": 3914885184,
"exploreMode": true,
"watermark": false,
"enhance_prompt": true,
"width": 1280,
"height": 768,
"assetGroupName": "Generative Video",
"recordingEnabled": true
},
"status": "PENDING",
"error": null,
"progressText": null,
"progressRatio": null,
"estimatedTimeToStartSeconds": 1.0526315789473684,
"artifacts": [],
"sharedAsset": null
}
}
修改于 2024-10-18 17:45:20