Crea un task image-to-video di Runway
Usa CometAPI per chiamare Runway image_to_video e convertire l’URL di un’immagine statica in output video raw, con supporto X-Runway-Version per la compatibilità.
Prima di chiamarlo
- Invia l’header
X-Runway-Versionrichiesto, ad esempio2024-11-06 - Usa
model: gen3a_turbo - Fornisci un
promptImageHTTPS stabile - Inizia con
duration: 5e un valore ratio supportato per il model/version di Runway selezionato
Duration e ratio
ratio, non size. Interpreta i valori ratio in stile risoluzione come il loro equivalente WxH: 1280:720 corrisponde a 1280x720, 720:1280 corrisponde a 720x1280 e 1280:768 può comunque essere renderizzato come 1280x720 a seconda del model/version selezionato.
Flusso del task
Invia la richiesta image-to-video
Memorizza l'id restituito
id del task per il polling successivo.Esegui il polling dello stato del task
task_not_exist, attendi qualche secondo e riprova.Autorizzazioni
Bearer token authentication. Use your CometAPI key.
Intestazioni
Runway version header, for example 2024-11-06.
Corpo
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.
Risposta
Task accepted.