创建一个 Runway 图生视频任务
使用 CometAPI 调用 Runway image_to_video,将静态图片 URL 转换为原始视频输出,并通过 X-Runway-Version 支持兼容性。
调用前准备
- 发送必需的
X-Runway-Version请求头,例如2024-11-06 - 使用
model: gen3a_turbo - 提供稳定可访问的 HTTPS
promptImage - 以
duration: 5和所选 Runway model/version 支持的 ratio 值开始
Duration 和 ratio
ratio,而不是 size。请将分辨率样式的 ratio 值理解为其对应的 WxH:1280:720 表示目标为 1280x720,720:1280 表示目标为 720x1280,而 1280:768 仍可能根据所选 model/version 渲染为 1280x720。
任务流程
提交图生视频请求
保存返回的 id
id 以便后续轮询。轮询任务状态
task_not_exist,请等待几秒后重试。授权
Bearer token authentication. Use your CometAPI key.
请求头
Runway version header, for example 2024-11-06.
请求体
Source image URL.
Runway image-to-video model ID. Choose an available model from the Models page.
Random seed for reproducible results. Range: 0–999999999.
Text prompt describing the desired motion or scene. Maximum 512 characters.
Whether to add a watermark to the output video.
Video duration in seconds. Runway support is model/version dependent; use 5 or 10 for the broadest compatibility. CometAPI forwards this value to Runway.
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.
响应
Task accepted.