建立 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.