Skip to main content
POST
cURL
Usa 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 model su aleph2 e fornisci videoUri per un video di massimo 30 secondi.
  • Facoltativo: includi promptText per 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 in keyframes. Ogni oggetto contiene un’immagine uri e una sola posizione esatta: Il timestamp del keyframe deve rientrare nella relativa finestra di modifica. Se utilizzi 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

Usa targetAspectRatio 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. Se 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 valore id 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

Authorization
string
header
obbligatorio

Your CometAPI API key.

Corpo

application/json

Aleph 2 video-editing request.

model
enum<string>
obbligatorio

Model ID for this request.

Opzioni disponibili:
aleph2
videoUri
obbligatorio

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.

Required string length: 13 - 2048
Pattern: ^https://
promptText
string

Optional instruction describing the edit, from 1 to 1,000 characters. Can be omitted when using keyframes.

Required string length: 1 - 1000
keyframes
object[] | null

One 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.

Maximum array length: 5

Guidance image positioned using seconds.

targetAspectRatio
enum<string>

Target aspect ratio for expansion. The input video and keyframes are letterboxed to this shape before generation.

Opzioni disponibili:
16:9,
4:3,
3:2,
1:1,
2:3,
3:4,
9:16,
21:9
ratio
string
deprecato

Deprecated aspect-ratio field. Use targetAspectRatio instead.

seed
integer

Sampling seed. Omit for a random seed; 0 is treated as omission.

Intervallo richiesto: 0 <= x <= 4294967295
outputFormat
enum<string>

Output 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.

Opzioni disponibili:
mp4,
prores,
png_sequence,
sdr_rec709_10bit
proresProfile
enum<string>

ProRes profile. Include only with outputFormat set to prores; omit for 4444. The 4444 and 4444 XQ profiles have an opaque alpha channel.

Opzioni disponibili:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ
contentModeration
object

Content moderation settings. Omit to use the standard settings.

Risposta

The task was created. Save its id for task retrieval.

id
string
obbligatorio

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

Ultima modifica il 18 settembre 2026