Zum Hauptinhalt springen
POST
cURL
Verwenden Sie gen4.5, um ein Video aus einem Text-Prompt zu generieren. Senden Sie Ihren CometAPI-API -Schlüssel mit Bearer-Authentifizierung und einem JSON-Anfragetext.

Die Anfrage vorbereiten

  • Setzen Sie model auf gen4.5.
  • Beschreiben Sie die Szene und Bewegung in promptText mit 1 bis 1.000 UTF-16-Codeeinheiten.
  • Setzen Sie ratio für das Querformat auf 1280:720 oder für das Hochformat auf 720:1280.
  • Setzen Sie duration auf eine ganze Zahl von 2 bis 10 Sekunden.
Alle vier Felder sind erforderlich. Um mit einem Bild zu beginnen, verwenden Sie die Anleitung zum Erstellen einer Runway Bild-zu-Video-Aufgabe. Nehmen Sie in diese Text-zu-Video-Anfrage weder promptImage noch einen audio-Schalter auf.

Optionale Steuerelemente festlegen

Für einen expliziten Sampling-Seed verwenden Sie 1 bis 4294967295. Das Weglassen oder 0 wählt einen zufälligen Seed aus. Wenn Sie contentModeration angeben, setzen Sie dessen publicFigureThreshold auf auto oder low; lassen Sie das Objekt andernfalls weg. Verwenden Sie outputFormat, um MP4, ProRes, PNG-Sequenzen oder eines der HDR- Formate auszuwählen, die im Anfrage-Schema aufgeführt sind. Lassen Sie es für H.264 MP4 weg. Sie können proresProfile nur festlegen, wenn outputFormat auf prores oder hdr_prores gesetzt ist. Das HDR-ProRes-Format akzeptiert 422, 422 HQ oder 4444.

Das Ergebnis abrufen

Speichern Sie den zurückgegebenen Wert id und folgen Sie der Anleitung zum Abrufen einer Runway-Aufgabe. Wenn status den Wert SUCCEEDED hat, lesen Sie die Video-URLs in output.

Autorisierungen

Authorization
string
header
erforderlich

Use your CometAPI API key.

Body

application/json

Request parameters for gen4.5.

model
enum<string>
erforderlich

Model ID for this request variant.

Verfügbare Optionen:
gen4.5
Allowed value: "gen4.5"
promptText
string
erforderlich

Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.

Required string length: 1 - 1000
ratio
enum<string>
erforderlich

Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.

Verfügbare Optionen:
1280:720,
720:1280
duration
integer
erforderlich

Requested video duration in whole seconds, from 2 through 10.

Erforderlicher Bereich: 2 <= x <= 10
seed
integer

Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.

Erforderlicher Bereich: 0 <= x <= 4294967295
contentModeration
object

Optional content moderation settings. Omit the object to use standard moderation.

outputFormat
enum<string>
erforderlich if proresProfile is set

Output encoding. Omit for mp4 (H.264). prores returns MOV; png_sequence returns a PNG ZIP; sdr_rec709_10bit returns 10-bit Rec.709 HEVC. hdr10 and hlg return 10-bit HDR MP4; hdr_pq_12bit_master returns 12-bit HEVC MOV; hdr_prores returns HDR ProRes MOV. The HDR PNG/EXR sequence formats return ZIP archives; the ACEScg variants target the named ACES version.

Verfügbare Optionen:
mp4,
prores,
png_sequence,
hdr10,
hlg,
sdr_rec709_10bit,
hdr_pq_12bit_master,
hdr_prores,
hdr_png_sequence,
hdr_exr_sequence,
hdr_exr_acescg_sequence_1_3,
hdr_exr_acescg_sequence_2_0
proresProfile
enum<string>

Profile for outputFormat prores or hdr_prores. Omit for 4444 with prores, or 422 HQ with hdr_prores. hdr_prores accepts only 422, 422 HQ, or 4444. Omit this field for other formats.

Verfügbare Optionen:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ

Antwort

Task submitted. Save its id to retrieve task status.

id
string
erforderlich

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.

Zuletzt geändert am 21. September 2026