- 介绍
- 项目说明
- 身份验证
- 发出请求
- 支持模型(模型及费率一览表)
- openai api
- Claude
- 视频接口
- kling(官方格式)
- luma
- CogVideoX(官方格式)
- runway(开发中)
- sora
- 音乐接口
- 图片接口
- midjourney
- flux(开发中)
生成(generations) Copy
POST
https://api.openai-core.com/runway/v2/tasks
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json
Accept
string
可选
示例值:
application/json
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
taskType
string
必需
internal
boolean
必需
options
object
必需
name
string
必需
seconds
integer
必需
text_prompt
string
必需
seed
integer
必需
exploreMode
boolean
必需
watermark
boolean
必需
enhance_prompt
boolean
必需
init_image
string
必需
resolution
string
必需
image_as_end_frame
boolean
必需
assetGroupName
string
必需
示例
{
"taskType": "gen3a_turbo",
"internal": false,
"options": {
"name": "Gen-3 Alpha Turbo 3994113795, boom , Cropped - whZmnSNxhJ",
"seconds": 10,
"text_prompt": "boom fly monkey",
"seed": 3994113795,
"exploreMode": false,
"watermark": true,
"enhance_prompt": true,
"init_image": "https://filesystem.site/cdn/20240816/OtT0bmrskhqL40mHtoiZg5eNyE4ge0.jpg",
"resolution": "720p",
"image_as_end_frame": 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.openai-core.com/runway/v2/tasks' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"taskType": "gen3a_turbo",
"internal": false,
"options": {
"name": "Gen-3 Alpha Turbo 3994113795, boom , Cropped - whZmnSNxhJ",
"seconds": 10,
"text_prompt": "boom fly monkey",
"seed": 3994113795,
"exploreMode": false,
"watermark": true,
"enhance_prompt": true,
"init_image": "https://filesystem.site/cdn/20240816/OtT0bmrskhqL40mHtoiZg5eNyE4ge0.jpg",
"resolution": "720p",
"image_as_end_frame": 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
integer
必需
artifacts
array[string]
必需
sharedAsset
null
必需
server_id
string
必需
示例
{
"task": {
"id": "7e647762-5b4c-45f9-a4cf-7248f1eec6fc",
"name": "Gen-3 Alpha Turbo 3994113795, boom , Cropped - whZmnSNxhJ",
"image": null,
"createdAt": "2024-11-04T07:12:39.531Z",
"updatedAt": "2024-11-04T07:12:39.569Z",
"taskType": "gen3a_turbo",
"options": {
"name": "Gen-3 Alpha Turbo 3994113795, boom , Cropped - whZmnSNxhJ",
"seconds": 10,
"text_prompt": "boom fly monkey",
"seed": 3994113795,
"exploreMode": false,
"watermark": true,
"enhance_prompt": true,
"init_image": "https://d2jqrm6oza8nb6.cloudfront.net/datasets/7d5fc461-4282-4637-9628-5034808dd5fb.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNDc5YTk2NmU5YTIyYjkxNiIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTczMDg1MTIwMH0.PztS_3Ge9bfWdiPRLrIR2h-0jaMkdgoU5h_SiIp3Cxc",
"resolution": "720p",
"image_as_end_frame": false,
"assetGroupName": "Generative Video",
"recordingEnabled": true
},
"status": "PENDING",
"error": null,
"progressText": null,
"progressRatio": null,
"estimatedTimeToStartSeconds": 0,
"artifacts": [],
"sharedAsset": null
},
"server_id": "d94b7b6d-cde7-413d-9408-a7a4009194fe"
}
修改于 2024-11-04 07:24:23