- 前言(必读)
- OpenAI官方SDK使用教程
- 批量请求示例
- 聊天模型(Chat)
- 内容审查
- 向量嵌入
- 图片处理
- 绘画模型(Painting)
- 视频模型(Video)
- 视频模型说明
- 快手可灵AI
- vidu视频
- 即梦AI
- pika视频
- luma视频
- runway 官方API
- runway 旧版API-暂时失效
- 数字人
- 音频模型(Audio)
- 音乐创作(suno)
- 文档处理
- 3D模型
- 网络爬虫
- 更多接口开发中...
- 查询令牌用量GET
- 查询令牌限额GET
- 查询账户信息GET
任务:生成视频.gen2
POST
/runway/tasks
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
taskType
string
版本 gen2
internal
boolean
可选
options
object
必需
name
string
可选
seconds
integer
视频时长
gen2Options
object
必需
exploreMode
boolean
可选
assetGroupName
string
可选
notify_hook
string
回调url 回调的格式 就是 返回体
示例
{
"taskType": "gen2",
"internal": false,
"options": {
"name": "Gen-2 1919715046",
"seconds":4,
"gen2Options": {
"mode": "gen2",
"seed": 1919715046,
"interpolate": true,
"upscale": false,
"watermark": true,
"motion_score": 22,
"use_motion_score": true,
"use_motion_vectors": false,
"text_prompt": "The wind blows hair up.",
"image_prompt": "https://d2jqrm6oza8nb6.cloudfront.net/previews/7e8c546f-47ee-49f3-bd42-dbb0c8b0f09f.jpeg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiODI3MWVkMWFhN2ZhMzAyNSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyNzgyNzIwMH0.7Ln4zEYrvH0aqze_zoKW9xtsKTWRjnWCY4vs1S0S2yY",
"init_image": "https://d2jqrm6oza8nb6.cloudfront.net/previews/7e8c546f-47ee-49f3-bd42-dbb0c8b0f09f.jpeg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiODI3MWVkMWFhN2ZhMzAyNSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyNzgyNzIwMH0.7Ln4zEYrvH0aqze_zoKW9xtsKTWRjnWCY4vs1S0S2yY"
},
"exploreMode": false,
"assetGroupName": "Generative Video"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gpt.ge/runway/tasks' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskType": "gen2",
"internal": false,
"options": {
"name": "Gen-2 1919715046",
"seconds":4,
"gen2Options": {
"mode": "gen2",
"seed": 1919715046,
"interpolate": true,
"upscale": false,
"watermark": true,
"motion_score": 22,
"use_motion_score": true,
"use_motion_vectors": false,
"text_prompt": "The wind blows hair up.",
"image_prompt": "https://d2jqrm6oza8nb6.cloudfront.net/previews/7e8c546f-47ee-49f3-bd42-dbb0c8b0f09f.jpeg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiODI3MWVkMWFhN2ZhMzAyNSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyNzgyNzIwMH0.7Ln4zEYrvH0aqze_zoKW9xtsKTWRjnWCY4vs1S0S2yY",
"init_image": "https://d2jqrm6oza8nb6.cloudfront.net/previews/7e8c546f-47ee-49f3-bd42-dbb0c8b0f09f.jpeg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiODI3MWVkMWFhN2ZhMzAyNSIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyNzgyNzIwMH0.7Ln4zEYrvH0aqze_zoKW9xtsKTWRjnWCY4vs1S0S2yY"
},
"exploreMode": false,
"assetGroupName": "Generative Video"
}
}'
返回响应
🟢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": "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
}
}
修改于 2024-11-10 18:20:33