Appearance
🎬 视频模型 runway
- 2024.07.27 本站已经支持 视频模型
runway
runway
本身无api, 跟GPTs 一样是通过逆向得来,- 支持
文生视频
图生视频
- 价格分3种 请参考计费
- 如何使用 访问 https://runway.ddaiai.com 看下面的
在线测试
在线测试
1.访问 https://runway.ddaiai.com (如果被墙了,换下二级域名前缀 suibian
)
2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.com
把 suibian
换其他的 如 https://2025.ddaiai.com
都能访问
计费
官方计费
- https://help.runwayml.com/hc/en-us/articles/15124877443219-How-do-credits-work
- 1点 15美刀/625点=0.024美刀/点
- gen3 10点/s 5秒就要 50*0.024=1.2美刀
- gen3 turbo 5点/s 5秒就要 25*0.024=0.6美刀
openai-hk 计费
- runway-gen2 按次 2000积分/次 带水印
- runway-gen3 按时 1200积分/秒 不带水印,95刀套餐不会消耗点数但限制并发
- runway-gen3-fast 按时 9000积分/秒 不带水印 几乎没有等待时间,套餐内会消耗点数并发限制更松
- runway-gen3-turbo-fast 按时 4500积分/秒 不带水印 几乎没有等待时间,套餐内会消耗点数并发限制更松
设置
- 打开 https://runway.ddaiai.com
- 下图相应的地方设置
- Runway接口地址:https://api.openai-hk.com
- Runway KEY: hk-你的apiKey
效果
得到效果
Runway API
- 约定 header 需要带上
Authorization: Bearer hk-你的key
- Runway 接口地址 https://api.openai-hk.com/runway
创建视频任务.gen2
请求体
json
{
"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":""
}
{
"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":""
}
关键字段说明
字段 | 类型 | 说明 |
---|---|---|
taskType | string | 版本 gen2 |
notify_hook | string | 回调url 回调的格式 就是 返回体 |
options.seconds | int | 时长 |
options.gen2Options.seed | int | 种子 |
options.gen2Options.text_prompt | string | 提示词 |
options.gen2Options.image_prompt | string | 参考图片 需要通过上传接口得到的图片链接 如果没有必须把字段删除 |
options.gen2Options.init_image | string | 参考图片 需要通过上传接口得到的图片链接 如果没有必须把字段删除 |
- 特别说明
init_image
必要通过runway自己的图片地址 不然会报错
返回体
json
{
"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
}
}
{
"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
}
}
得到 task.id
为TaskID
供任务查询
创建视频任务.gen3
请求体
json
{
"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":""
}
{
"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":""
}
关键字段说明
字段 | 类型 | 说明 |
---|---|---|
taskType | string | 值 europa 版本为 gen3 , gen3a_turbo 版本为 gen3 turbo |
notify_hook | string | 回调url 回调的格式 就是 返回体 |
options.seconds | int | 时长 |
options.seed | int | 种子 |
options.text_prompt | string | 提示词 |
options.exploreMode | boolean | true 为runway-gen3 , false 为runway-gen3-fast |
options.init_image | string | 参考图片 需要通过上传接口得到的图片链接 如果没有必须把字段删除 gen3 turbo 必须带图 |
options.image_as_end_frame | bool | true 作为尾帧,默认是首帧 |
返回体
json
{
"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
}
}
{
"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
}
}
得到 task.id
为TaskID
供任务查询
用视频创建视频任务.gen3
请求体
json
{
"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"
}
}
{
"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"
}
}
关键字段说明
字段 | 类型 | 说明 |
---|---|---|
taskType | string | 值 europa 版本为 gen3 , gen3a_turbo 版本为 gen3 turbo |
notify_hook | string | 回调url 回调的格式 就是 返回体 |
options.seconds | int | 时长 |
options.seed | int | 种子 |
options.text_prompt | string | 提示词 |
options.exploreMode | boolean | true 为runway-gen3 , false 为runway-gen3-fast |
options.video_prompt | string | 参考视频 需要通过上传接口得到的视频链接 如果没有必须把字段删除 gen3 turbo 必须带图或者视频 |
- 特别说明
video_prompt
必要通过上传接口来 得到runway自己的地址 不然会报错
返回体 请参考 创建视频任务.gen3
得到 task.id
为TaskID
供任务查询
任务查询
shell
curl --request GET \
--url https://api.openai-hk.com/runway/tasks/fc4a68aa-4280-42cb-b55c-e1d9a64960e0 \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json'
curl --request GET \
--url https://api.openai-hk.com/runway/tasks/fc4a68aa-4280-42cb-b55c-e1d9a64960e0 \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json'
返回体
json
{
"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:42:04.782Z",
"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": "SUCCEEDED",
"error": null,
"progressText": null,
"progressRatio": "1",
"estimatedTimeToStartSeconds": null,
"artifacts": [
{
"id": "3c33bee5-5d50-4a6d-bb7d-a690496ca2ce",
"createdAt": "2024-07-26T16:42:04.734Z",
"updatedAt": "2024-07-26T16:42:04.734Z",
"userId": 17792681,
"createdBy": 17792681,
"taskId": "fc4a68aa-4280-42cb-b55c-e1d9a64960e0",
"parentAssetGroupId": "bffe20f1-b5c6-4bc1-a32f-bb71c8148adc",
"filename": "Gen-2 1675247627, An older man playing, y3jpg, M 5.mp4",
"url": "https://dnznrvs05pmza.cloudfront.net/9773beb4-39c0-417f-9f4e-f2fd6dc213d5.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNTI1MjM4NDI3NDcyZWM1NCIsImJ1Y2tldCI6InJ1bndheS10YXNrLWFydGlmYWN0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyMjEyNDgwMH0.5wlX55clcZqVVzGi48i-ReAB3tpJSkpTRcw6WL8GclQ",
"fileSize": "1340124",
"isDirectory": false,
"previewUrls": [
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/3312f869-e2c2-480d-85eb-5c06490a6171.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNjE0ZGEwYjBjNzNhYTkzNSIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.jiuoC4Ev5KFglJUEtwKYMyGbtoIMec1GUhSe_y8kx-w",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/25d1070f-71b7-45ae-ae57-b4fb5c7e0086.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiZmE2MmNjYjdkZjg1MDlkOCIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.tmc-uu0TVBixnJYTjC5mQCVxgBvaK4ppEV2N7BjKzxE",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/0c13dd88-d14d-49ed-bea4-f526fd820311.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiZGZiOTEwMGVmNTkzMzFkOCIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.9eqVp2pTCmI8SUuYga3slh-wqp5Fe2ndRPFhpiJ9IPQ",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/6a997662-f054-41ec-a124-2402002bc50f.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNjNjOTA1ODRjMjM3ZGU2MyIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.oxQiSRQWhdOwPrdh--K4D3Jdh-KxCEASGwt7_zKWMNE",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/a5483fec-5c29-40c1-8317-73330c6865b7.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiYTQ1NTM0NDc0ODViMzcwZSIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.3_b5AzPdEWPah140L4WETz4ANaoEkN8GESkexhdREDo"
],
"private": true,
"privateInTeam": true,
"deleted": false,
"reported": false,
"metadata": {
"frameRate": 24,
"duration": 4,
"dimensions": [
512,
1792
],
"size": {
"width": 512,
"height": 1792
}
},
"favorite": false
}
],
"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:42:04.782Z",
"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": "SUCCEEDED",
"error": null,
"progressText": null,
"progressRatio": "1",
"estimatedTimeToStartSeconds": null,
"artifacts": [
{
"id": "3c33bee5-5d50-4a6d-bb7d-a690496ca2ce",
"createdAt": "2024-07-26T16:42:04.734Z",
"updatedAt": "2024-07-26T16:42:04.734Z",
"userId": 17792681,
"createdBy": 17792681,
"taskId": "fc4a68aa-4280-42cb-b55c-e1d9a64960e0",
"parentAssetGroupId": "bffe20f1-b5c6-4bc1-a32f-bb71c8148adc",
"filename": "Gen-2 1675247627, An older man playing, y3jpg, M 5.mp4",
"url": "https://dnznrvs05pmza.cloudfront.net/9773beb4-39c0-417f-9f4e-f2fd6dc213d5.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNTI1MjM4NDI3NDcyZWM1NCIsImJ1Y2tldCI6InJ1bndheS10YXNrLWFydGlmYWN0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyMjEyNDgwMH0.5wlX55clcZqVVzGi48i-ReAB3tpJSkpTRcw6WL8GclQ",
"fileSize": "1340124",
"isDirectory": false,
"previewUrls": [
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/3312f869-e2c2-480d-85eb-5c06490a6171.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNjE0ZGEwYjBjNzNhYTkzNSIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.jiuoC4Ev5KFglJUEtwKYMyGbtoIMec1GUhSe_y8kx-w",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/25d1070f-71b7-45ae-ae57-b4fb5c7e0086.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiZmE2MmNjYjdkZjg1MDlkOCIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.tmc-uu0TVBixnJYTjC5mQCVxgBvaK4ppEV2N7BjKzxE",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/0c13dd88-d14d-49ed-bea4-f526fd820311.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiZGZiOTEwMGVmNTkzMzFkOCIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.9eqVp2pTCmI8SUuYga3slh-wqp5Fe2ndRPFhpiJ9IPQ",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/6a997662-f054-41ec-a124-2402002bc50f.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiNjNjOTA1ODRjMjM3ZGU2MyIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.oxQiSRQWhdOwPrdh--K4D3Jdh-KxCEASGwt7_zKWMNE",
"https://dnf8butk8bbsy.cloudfront.net/task_artifact_previews/a5483fec-5c29-40c1-8317-73330c6865b7.jpg?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiYTQ1NTM0NDc0ODViMzcwZSIsImJ1Y2tldCI6InJ1bndheS11cGxvYWRzLXByb2QiLCJzdGFnZSI6InByb2QiLCJleHAiOjE3MjIxMjQ4MDB9.3_b5AzPdEWPah140L4WETz4ANaoEkN8GESkexhdREDo"
],
"private": true,
"privateInTeam": true,
"deleted": false,
"reported": false,
"metadata": {
"frameRate": 24,
"duration": 4,
"dimensions": [
512,
1792
],
"size": {
"width": 512,
"height": 1792
}
},
"favorite": false
}
],
"sharedAsset": null
}
}
扩展视频.extend
请求体
json
{
"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"
}
}
{
"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"
}
}
其他关键字 请参考 创建视频任务gen3 下面仅说明扩展关键字
字段 | 类型 | 说明 |
---|---|---|
options.extended_from_task_id | string | 扩展的任务ID |
options.init_video | string | 被扩展的视频链接 |
返回体跟 创建视频任务gen3的返回体是一样的
上传.A预报获取认证
shell
curl --request POST \
--url https://api.openai-hk.com/runway/uploads \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"filename": "163-q.jpeg",
"numberOfParts": 1,
"type": "DATASET_PREVIEW"
}'
curl --request POST \
--url https://api.openai-hk.com/runway/uploads \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{
"filename": "163-q.jpeg",
"numberOfParts": 1,
"type": "DATASET_PREVIEW"
}'
请求体
json
{
"filename": "163-q.jpeg",
"numberOfParts": 1,
"type": "DATASET_PREVIEW"
}
{
"filename": "163-q.jpeg",
"numberOfParts": 1,
"type": "DATASET_PREVIEW"
}
返回体
json
{
"id": "4e806398-cd0a-48c6-9ac8-6322ed693785",
"uploadUrls": [
"https://runway-datasets.s3.us-east-1.amazonaws.com/previews/38636c93-c137-4eb7-b983-450f7d0871b1.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIA5PY5AQY4YNAEKQFK%2F20240726%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240726T164242Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAEaCXVzLWVhc3QtMSJHMEUCIGzXIRC8eW6QRXb4UfI3mGuXHYJhn9WsCLpfOQEdgqiuAiEA2oimEh028yuECo%2B2WoxRZSjgMHfLqNX84uszilG6JKYq8gMI2v%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAEGgw5MjcyMzY5MTY3OTMiDA9mkwGgaSsTQPwikirGA%2BtDGpYH%2FYnSinCTWmnBNbWbKYm01FbTXVXEQhqAHkqpHJ7v8ByDZzIRGmCiqj3k%2BYqYgxkYllH41hrntSCESbM9ci0M3hqypsBCDDReH%2BdEFhG20eOvx4NbnNu8DO34EcTr0XEuHvFhfBB07yBZ%2FkRfyFWAhGrn8FTbfVvTfZONoGr2fNqo31NU%2F%2Bnar%2FToszgHpweA2lVBlZlN5WFFWTSP%2FX77K%2BLW0%2BZr57J%2FzFXrWQG9Vtty9A%2Fbr%2BwcVDO9gv%2FLcRUvs8vUPxxAX5%2ByZ51f%2B8MQvENP0sV7lABj6zYhMYGl2FJO8ASo05T1zGgUod448yE7CkveenR7Jst1%2BmB%2FsD7GcY3HdctBQUYCrodcNOP1m4o51KykFZuwWnhhVx9FG53KalpwPBANgea8%2BXSLTY%2FsjPYITAOWgCoSJ%2FShEYMeJC6T3yxJC04PoBqXAP31hu10koCK7yqWYzNH89BQ4UW8cTriixI8wgAJCmaCCg1Dm3xiJAAznPw7dnPaJdNCjiIik8tM1GBgXkqwTYWzpCJBeSnQVeeBpbxd7RwGib8V3jhawYCfyIa01iw%2B7ZX9C8y3PXi2ncub4VZGj3DfafHIbacwhaCPtQY6pQGelWlBM5Ftg4cdnKOGC6wZboGLp%2BvcU5RCw9j9MoKSrZFA2iQEl2Atnxb5CKrEBZCahy1MJI6kE%2BGQ0hNv4AwLCUvlyWIn9zcdHa162I6hFDccAkkLsr%2FQUT5sgkxqQhH6OzkdOub4sPaRXIIJbWHDqa73nd1xVScVhRvd8GP9ip8cxK0wFitt%2Fu04zr7PuMWIg8I85pEK%2FHu63XLvs5zYyZj5GMc%3D&X-Amz-Signature=c3053c853994e21fb4b9f34d2c5595129344b1ed2606dc953beeb120888c6e19&X-Amz-SignedHeaders=host&x-id=PutObject"
],
"uploadHeaders": {
"Content-Type": "image/jpeg"
}
}
{
"id": "4e806398-cd0a-48c6-9ac8-6322ed693785",
"uploadUrls": [
"https://runway-datasets.s3.us-east-1.amazonaws.com/previews/38636c93-c137-4eb7-b983-450f7d0871b1.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIA5PY5AQY4YNAEKQFK%2F20240726%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240726T164242Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEAEaCXVzLWVhc3QtMSJHMEUCIGzXIRC8eW6QRXb4UfI3mGuXHYJhn9WsCLpfOQEdgqiuAiEA2oimEh028yuECo%2B2WoxRZSjgMHfLqNX84uszilG6JKYq8gMI2v%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAEGgw5MjcyMzY5MTY3OTMiDA9mkwGgaSsTQPwikirGA%2BtDGpYH%2FYnSinCTWmnBNbWbKYm01FbTXVXEQhqAHkqpHJ7v8ByDZzIRGmCiqj3k%2BYqYgxkYllH41hrntSCESbM9ci0M3hqypsBCDDReH%2BdEFhG20eOvx4NbnNu8DO34EcTr0XEuHvFhfBB07yBZ%2FkRfyFWAhGrn8FTbfVvTfZONoGr2fNqo31NU%2F%2Bnar%2FToszgHpweA2lVBlZlN5WFFWTSP%2FX77K%2BLW0%2BZr57J%2FzFXrWQG9Vtty9A%2Fbr%2BwcVDO9gv%2FLcRUvs8vUPxxAX5%2ByZ51f%2B8MQvENP0sV7lABj6zYhMYGl2FJO8ASo05T1zGgUod448yE7CkveenR7Jst1%2BmB%2FsD7GcY3HdctBQUYCrodcNOP1m4o51KykFZuwWnhhVx9FG53KalpwPBANgea8%2BXSLTY%2FsjPYITAOWgCoSJ%2FShEYMeJC6T3yxJC04PoBqXAP31hu10koCK7yqWYzNH89BQ4UW8cTriixI8wgAJCmaCCg1Dm3xiJAAznPw7dnPaJdNCjiIik8tM1GBgXkqwTYWzpCJBeSnQVeeBpbxd7RwGib8V3jhawYCfyIa01iw%2B7ZX9C8y3PXi2ncub4VZGj3DfafHIbacwhaCPtQY6pQGelWlBM5Ftg4cdnKOGC6wZboGLp%2BvcU5RCw9j9MoKSrZFA2iQEl2Atnxb5CKrEBZCahy1MJI6kE%2BGQ0hNv4AwLCUvlyWIn9zcdHa162I6hFDccAkkLsr%2FQUT5sgkxqQhH6OzkdOub4sPaRXIIJbWHDqa73nd1xVScVhRvd8GP9ip8cxK0wFitt%2Fu04zr7PuMWIg8I85pEK%2FHu63XLvs5zYyZj5GMc%3D&X-Amz-Signature=c3053c853994e21fb4b9f34d2c5595129344b1ed2606dc953beeb120888c6e19&X-Amz-SignedHeaders=host&x-id=PutObject"
],
"uploadHeaders": {
"Content-Type": "image/jpeg"
}
}
这里得到 id 在 步骤C上使用,uploadUrls 在步骤B上使用
上传.B执行上传
js
let res = await fetch( d.uploadUrls[0] //步骤A 中的 uploadUrls
, {
method: 'PUT',
body: file, // 上传文件
headers: {
'Content-Type': d.uploadHeaders["Content-Type"], //步骤A 中的 uploadHeaders
'Accept': '/',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Connection': 'keep-alive'
}
}) ;
let res = await fetch( d.uploadUrls[0] //步骤A 中的 uploadUrls
, {
method: 'PUT',
body: file, // 上传文件
headers: {
'Content-Type': d.uploadHeaders["Content-Type"], //步骤A 中的 uploadHeaders
'Accept': '/',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Connection': 'keep-alive'
}
}) ;
返回200 就说明正常
上传.C完成回报
shell
curl --request POST \
--url https://api.openai-hk.com/runway/uploads/4e806398-cd0a-48c6-9ac8-6322ed693785/complete \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{"parts":[{"PartNumber":1,"ETag":"ca3b00c313b6fd9a5c48889ad16f7d5e"}]}'
curl --request POST \
--url https://api.openai-hk.com/runway/uploads/4e806398-cd0a-48c6-9ac8-6322ed693785/complete \
--header 'Authorization: Bearer hk-your-key' \
--header 'content-type: application/json' \
--data '{"parts":[{"PartNumber":1,"ETag":"ca3b00c313b6fd9a5c48889ad16f7d5e"}]}'
请求体
json
{
"parts": [
{
"PartNumber": 1,
"ETag": "可以乱填"
}
]
}
{
"parts": [
{
"PartNumber": 1,
"ETag": "可以乱填"
}
]
}
返回体
json
{
"url": "https://d2jqrm6oza8nb6.cloudfront.net/previews/384cf95c-13e5-4dd5-9c29-680d81ddfd60?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiMTU2OGIzZDIyMTZmMzIxYyIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyMTM0NzIwMH0.mAdwPycvWvUXjfIgrDEmZth7t2yghokMnwMVmlHhVss"
}
{
"url": "https://d2jqrm6oza8nb6.cloudfront.net/previews/384cf95c-13e5-4dd5-9c29-680d81ddfd60?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiMTU2OGIzZDIyMTZmMzIxYyIsImJ1Y2tldCI6InJ1bndheS1kYXRhc2V0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTcyMTM0NzIwMH0.mAdwPycvWvUXjfIgrDEmZth7t2yghokMnwMVmlHhVss"
}
得到图片链接 url
图片有时效性