Skip to content

🎬 视频模型 runway gen3a_turbo

在线测试

1.访问 https://runway.ddaiai.com (如果被墙了,换下二级域名前缀 suibian)
2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.comsuibian 换其他的 如 https://2025.ddaiai.com 都能访问

在线测试

设置

Runway

效果

得到效果 Runway

Runway API

创建视频任务

post https://api.openai-hk.com/runwayml/v1/image_to_video

curl

shell
curl --request POST \
  --url https://api.openai-hk.com/runwayml/v1/image_to_video \ 
  --header 'Authorization: Bearer hk-your-key' \ 
  --header 'Content-Type: application/json' \ 
  --data '{
    "promptImage": [
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"first"},
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"last"}
    ],
    "seed": 4294967295,
    "model": "gen3a_turbo",
    "promptText": "wave",
    "watermark": false,
    "duration": 5,
    "ratio": "1280:768"
  }'
curl --request POST \
  --url https://api.openai-hk.com/runwayml/v1/image_to_video \ 
  --header 'Authorization: Bearer hk-your-key' \ 
  --header 'Content-Type: application/json' \ 
  --data '{
    "promptImage": [
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"first"},
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"last"}
    ],
    "seed": 4294967295,
    "model": "gen3a_turbo",
    "promptText": "wave",
    "watermark": false,
    "duration": 5,
    "ratio": "1280:768"
  }'

请求体

json
{
    "promptImage": [
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"first"},
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"last"}
    ],
    "seed": 4294967295,
    "model": "gen3a_turbo",
    "promptText": "wave",
    "watermark": false,
    "duration": 5,
    "ratio": "1280:768"
  }
{
    "promptImage": [
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"first"},
        {"uri":"https://www.openai-hk.com/res/img/open.png","position":"last"}
    ],
    "seed": 4294967295,
    "model": "gen3a_turbo",
    "promptText": "wave",
    "watermark": false,
    "duration": 5,
    "ratio": "1280:768"
  }

关键字段说明

字段类型说明
promptImageobject[]promptImage参考图 首帧跟尾帧
promptImage[0].uristring可以是图片的url, 也可以是 base64
promptImage[0].positionstring图片位置first首帧 last尾帧
durationint时长 5 或者 10
seedint种子
ratiostring屏幕 1280:768为横屏 768:1280为竖屏
modelstring模型目前仅支持 gen3a_turbo
notify_hookstring回调地址 不是必须

返回体

json
 {
	"id": "c7f2b640-9adb-4565-8e99-f759cacef00c"
}
 {
	"id": "c7f2b640-9adb-4565-8e99-f759cacef00c"
}

得到 task.idTaskID 供任务查询

任务查询

get https://api.openai-hk.com/runwayml/v1/tasks/{TaskID}

shell
curl --request GET \
  --url https://api.openai-hk.com/runwayml/v1/tasks/c7f2b640-9adb-4565-8e99-f759cacef00c \ 
  --header 'Authorization: Bearer hk-your-key' \ 
  --header 'Content-Type: application/json' \
curl --request GET \
  --url https://api.openai-hk.com/runwayml/v1/tasks/c7f2b640-9adb-4565-8e99-f759cacef00c \ 
  --header 'Authorization: Bearer hk-your-key' \ 
  --header 'Content-Type: application/json' \

返回体.成功

json
{
	"id": "c7f2b640-9adb-4565-8e99-f759cacef00c",
	"output": [
		"https://dnznrvs05pmza.cloudfront.net/94a66520-1a1b-43c3-a684-676b3f7dabae.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiMDdmYzk5YjQxNmFlZTdiYSIsImJ1Y2tldCI6InJ1bndheS10YXNrLWFydGlmYWN0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTczMTgwMTYwMH0.BbJr86wkWwEjngHBwQutQV-4BgQjG1jdQsMLS4eAxN0"
	],
	"status": "SUCCEEDED",
	"createdAt": "2024-11-15T13:54:50.800Z"
}
{
	"id": "c7f2b640-9adb-4565-8e99-f759cacef00c",
	"output": [
		"https://dnznrvs05pmza.cloudfront.net/94a66520-1a1b-43c3-a684-676b3f7dabae.mp4?_jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXlIYXNoIjoiMDdmYzk5YjQxNmFlZTdiYSIsImJ1Y2tldCI6InJ1bndheS10YXNrLWFydGlmYWN0cyIsInN0YWdlIjoicHJvZCIsImV4cCI6MTczMTgwMTYwMH0.BbJr86wkWwEjngHBwQutQV-4BgQjG1jdQsMLS4eAxN0"
	],
	"status": "SUCCEEDED",
	"createdAt": "2024-11-15T13:54:50.800Z"
}

返回体.失败

json
{
	"id": "87f8a40c-2bf2-4a58-9fdc-486ed7c7244d",
	"status": "FAILED",
	"failure": "Text prompt did not pass moderation",
	"createdAt": "2024-11-15T16:06:41.521Z",
	"failureCode": "INPUT_PREPROCESSING.SAFETY.TEXT"
}
{
	"id": "87f8a40c-2bf2-4a58-9fdc-486ed7c7244d",
	"status": "FAILED",
	"failure": "Text prompt did not pass moderation",
	"createdAt": "2024-11-15T16:06:41.521Z",
	"failureCode": "INPUT_PREPROCESSING.SAFETY.TEXT"
}