Crea un task video-to-video di Runway
Modifica un video con Runway Aleph 2 tramite CometAPI, utilizzando un Prompt di testo, immagini guida temporizzate e un rapporto di formato di destinazione facoltativo.
aleph2 per modificare un video sorgente con un Prompt di testo. La richiesta restituisce un
task id; recupera i dettagli del task per ottenere l’output completato.
Prepara la richiesta
- Autenticati con la tua chiave API CometAPI.
- Imposta
modelsualeph2e forniscivideoUriper un video di massimo 30 secondi. - Facoltativo: includi
promptTextper descrivere la modifica, da 1 a 1.000 caratteri. Puoi anche ometterlo quando utilizzi i keyframe. - Sostituisci l’URL del file multimediale di esempio con un URL HTTPS accessibile. I campi multimediali accettano anche URI di dati Base64 con una dimensione codificata massima di 5 MB.
Aggiungi immagini guida temporizzate
Per guidare momenti specifici, fornisci da uno a cinque oggetti inkeyframes.
Ogni oggetto contiene un’immagine uri e una sola posizione esatta:
range,
impostalo in ogni keyframe. In caso contrario, ometti range da ogni keyframe.
Ometti keyframes quando non ti servono immagini guida. Un array vuoto o
null è considerato un’omissione.
Scegli la forma e il formato del fotogramma
UsatargetAspectRatio per richiedere l’espansione a 16:9, 4:3, 3:2, 1:1,
2:3, 3:4, 9:16, oppure 21:9. Il video di input e le immagini guida vengono
adattati con bande nere a questa forma prima della generazione. Il campo deprecato ratio
è facoltativo; utilizza targetAspectRatio per il controllo del rapporto di formato.
outputFormat è prores, puoi impostare proresProfile su 422, 4444,
422 Proxy, 422 LT, 422 HQ, oppure 4444 XQ. Il profilo predefinito è 4444.
Il canale alfa in 4444 e 4444 XQ è opaco. Ometti proresProfile
per altri formati di output.
Per un seed di campionamento esplicito, usa da 1 a 4294967295. Ometti seed
per un seed casuale; 0 è considerato un’omissione.
Recupera il risultato
Salva il valoreid restituito e usa
Ottenere un task Runway per recuperare lo stato del task.
Quando status è SUCCEEDED, leggi gli URL dei risultati da output. Se il task
non riesce, esamina failure e failureCode quando presenti.Autorizzazioni
Your CometAPI API key.
Corpo
Aleph 2 video-editing request.
Model ID for this request.
aleph2 Input video to edit, with a maximum duration of 30 seconds. Use an accessible HTTPS URL or a Base64 data URI with an encoded size of up to 5 MB.
13 - 2048^https://Optional instruction describing the edit, from 1 to 1,000 characters. Can be omitted when using keyframes.
1 - 1000One to five timed guidance images. Each image uses exactly one of seconds or at. Omit when no guidance images are needed; an empty array or null is treated as omission.
5Guidance image positioned using seconds.
- Option 1
- Option 2
Target aspect ratio for expansion. The input video and keyframes are letterboxed to this shape before generation.
16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 21:9 Deprecated aspect-ratio field. Use targetAspectRatio instead.
Sampling seed. Omit for a random seed; 0 is treated as omission.
0 <= x <= 4294967295Output format: mp4 for H.264 MP4, prores for ProRes MOV, png_sequence for a ZIP of PNG frames, or sdr_rec709_10bit for 10-bit Rec.709 HEVC MP4. Omit for mp4.
mp4, prores, png_sequence, sdr_rec709_10bit ProRes profile. Include only with outputFormat set to prores; omit for 4444. The 4444 and 4444 XQ profiles have an opaque alpha channel.
422, 4444, 422 Proxy, 422 LT, 422 HQ, 4444 XQ Content moderation settings. Omit to use the standard settings.
Risposta
The task was created. Save its id for task retrieval.
Task ID for GET /runwayml/v1/tasks/{id}.
Task state, when returned.
Task submission timestamp, when returned.
Result URLs, when returned.
Failure explanation, when returned.
Machine-readable failure code, when returned.
Task estimate metadata, when returned.
Task cost metadata, when returned.