Skip to main content
POST
cURL
使用此端点可将一张源图片制作成带动画效果的 Runway 视频。

调用前准备

  • 发送必需的 X-Runway-Version 请求头,例如 2024-11-06
  • 使用 model: gen3a_turbo
  • 提供稳定可访问的 HTTPS promptImage
  • duration: 5 和所选 Runway model/version 支持的 ratio 值开始

Duration 和 ratio

Runway 官方格式请求使用 ratio,而不是 size。请将分辨率样式的 ratio 值理解为其对应的 WxH1280:720 表示目标为 1280x720720:1280 表示目标为 720x1280,而 1280:768 仍可能根据所选 model/version 渲染为 1280x720

任务流程

1

提交图生视频请求

使用源图片和可选的简短运动 Prompt 创建任务。
2

保存返回的 id

保存任务 id 以便后续轮询。
3

轮询任务状态

使用 获取一个 Runway 任务。如果第一次轮询返回 task_not_exist,请等待几秒后重试。

授权

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

请求头

X-Runway-Version
string
必填

Runway version header, for example 2024-11-06.

请求体

application/json
promptImage
string
默认值:https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg
必填

Source image URL.

model
string
默认值:gen3a_turbo
必填

Runway image-to-video model ID. Choose an available model from the Models page.

seed
integer

Random seed for reproducible results. Range: 0–999999999.

promptText
string

Text prompt describing the desired motion or scene. Maximum 512 characters.

watermark
boolean
默认值:false

Whether to add a watermark to the output video.

duration
integer
默认值:5

Video duration in seconds. Runway support is model/version dependent; use 5 or 10 for the broadest compatibility. CometAPI forwards this value to Runway.

ratio
string
默认值:1280:768

Requested output ratio. Accepted values are Runway model/version dependent. With X-Runway-Version 2024-11-06, use a resolution-style value accepted by the selected model, such as 1280:768, 768:1280, 1280:720, or 720:1280. Read these as WxH targets, but completed media may normalize, so inspect the returned file before relying on exact pixels.

响应

200 - application/json

Task accepted.

id
string
必填