Przejdź do głównej treści
POST
cURL
Użyj aleph2, aby edytować film źródłowy za pomocą tekstowego Prompt. Żądanie zwraca zadanie id; pobierz szczegóły zadania, aby uzyskać gotowy wynik.

Przygotuj żądanie

  • Uwierzytelnij się za pomocą klucza API CometAPI.
  • Ustaw model na aleph2 i podaj videoUri dla filmu o długości do 30 sekund.
  • Opcjonalnie: uwzględnij promptText, aby opisać edycję, o długości od 1 do 1000 znaków. Możesz też go pominąć podczas używania klatek kluczowych.
  • Zastąp przykładowy adres URL multimediów dostępnym adresem URL HTTPS. Pola multimediów akceptują również identyfikatory URI danych Base64 o zakodowanym rozmiarze do 5 MB.

Dodaj obrazy wskazówek określone w czasie

Aby wskazać konkretne momenty, podaj od jednego do pięciu obiektów w keyframes. Każdy obiekt zawiera obraz uri i dokładnie jedną pozycję: Znacznik czasu klatki kluczowej musi mieścić się w jej oknie edycji. Jeśli używasz range, ustaw je w każdej klatce kluczowej. W przeciwnym razie pomiń range we wszystkich klatkach kluczowych. Pomiń keyframes, gdy nie potrzebujesz obrazów wskazówek. Pusta tablica lub null są traktowane jako pominięcie.

Wybierz kształt i format klatki

Użyj targetAspectRatio, aby zażądać rozszerzenia do 16:9, 4:3, 3:2, 1:1 2:3, 3:4, 9:16, lub 21:9. Film wejściowy i obrazy wskazówek są uzupełniane pasami do tego kształtu przed generowaniem. Przestarzałe pole ratio jest opcjonalne; do sterowania proporcjami obrazu użyj targetAspectRatio. Jeśli outputFormat ma wartość prores, możesz ustawić proresProfile na 422, 4444 422 Proxy, 422 LT, 422 HQ, lub 4444 XQ. Domyślny profil to 4444. Kanał alfa w 4444 i 4444 XQ jest nieprzezroczysty. Pomiń proresProfile dla innych formatów wyjściowych. Aby określić jawne ziarno próbkowania, użyj wartości od 1 do 4294967295. Pomiń seed dla losowego ziarna; 0 jest traktowane jako pominięcie.

Pobierz wynik

Zapisz zwrócone id i użyj Pobierz zadanie Runway aby pobrać status zadania. Gdy status ma wartość SUCCEEDED, odczytaj adresy URL wyników z output. Jeśli zadanie zakończy się niepowodzeniem, sprawdź failure i failureCode, jeśli są obecne.

Autoryzacje

Authorization
string
header
wymagane

Your CometAPI API key.

Treść

application/json

Aleph 2 video-editing request.

model
enum<string>
wymagane

Model ID for this request.

Dostępne opcje:
aleph2
videoUri
wymagane

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.

Dostępne opcje:
16:9,
4:3,
3:2,
1:1,
2:3,
3:4,
9:16,
21:9
ratio
string
przestarzałe

Deprecated aspect-ratio field. Use targetAspectRatio instead.

seed
integer

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

Wymagany zakres: 0 <= x <= 4294967295
outputFormat
enum<string>
wymagane if proresProfile is set

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.

Dostępne opcje:
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.

Dostępne opcje:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ
contentModeration
object

Content moderation settings. Omit to use the standard settings.

Odpowiedź

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

id
string
wymagane

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.

Ostatnia modyfikacja 22 września 2026