Buat task image-to-video Runway
Gunakan CometAPI untuk memanggil Runway image_to_video dan mengonversi URL gambar diam menjadi output video mentah, dengan dukungan X-Runway-Version untuk kompatibilitas.
Sebelum Anda memanggilnya
- Kirim header
X-Runway-Versionyang wajib, misalnya2024-11-06 - Gunakan
model: gen3a_turbo - Sediakan
promptImageHTTPS yang stabil - Mulai dengan
duration: 5dan nilai ratio yang didukung untuk model/versi Runway yang dipilih
Duration dan ratio
ratio, bukan size. Baca nilai ratio bergaya resolusi sebagai ekuivalen WxH-nya: 1280:720 menargetkan 1280x720, 720:1280 menargetkan 720x1280, dan 1280:768 tetap dapat dirender sebagai 1280x720 tergantung pada model/versi yang dipilih.
Alur task
Kirim permintaan image-to-video
Simpan id yang dikembalikan
id untuk polling nanti.Poll status task
task_not_exist, tunggu beberapa detik lalu coba lagi.Otorisasi
Bearer token authentication. Use your CometAPI key.
Header
Runway version header, for example 2024-11-06.
Body
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.
Respons
Task accepted.