Runway の image-to-video タスクを作成する
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
size ではなく ratio を使用します。解像度スタイルの ratio 値は、その WxH 相当として読み取ってください: 1280:720 は 1280x720、720:1280 は 720x1280 を対象とし、1280:768 も選択した model/version によっては 1280x720 としてレンダリングされる場合があります。
タスクの流れ
image-to-video リクエストを送信する
返された 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.