Zum Hauptinhalt springen
POST
Erstellen Sie ein HappyHorse-Video aus Text, Referenzbildern oder einem Anfangsbild. Die API gibt sofort eine Task-ID zurück. Speichern Sie id, um die Aufgabe abzufragen und das fertige Video herunterzuladen. POST /v1/videos verwendet multipart/form-data. Senden Sie Steuerelemente als Formularfelder und Referenzbilder als input_reference-Felder, jeweils mit einer HTTPS-URL oder hochgeladenen Bilddatei pro Feld.

Einen Eingabemodus auswählen

Referenzbilder steuern die Motive und visuellen Details im Video. Senden Sie 1–9 öffentlich zugängliche HTTPS-Bild-URLs oder 1–9 Bilddateien und wiederholen Sie input_reference einmal pro Bild in Bildreihenfolge. Verwenden Sie innerhalb dieses Feldes nur URLs oder nur Dateien. Senden Sie jede URL separat, anstatt URLs durch Kommas zu verbinden. Für input_reference muss jedes Referenzbild höchstens 10 MB groß sein und happyhorse-1.0 aufweisen. Bei happyhorse-1.1 muss jedes Referenzbild höchstens 20 MB groß sein. Diese Modellgrenzen gelten sowohl für Bild-URLs als auch für hochgeladene Dateien. Verwenden Sie JPEG-, JPG-, PNG- oder WEBP-Bilder mit einer kürzesten Seite von mindestens 400 px. Das Upload-Limit für input_reference beträgt 20 MiB (20 × 1024 × 1024 Byte) pro Datei. Hochgeladene Bilder müssen außerdem die oben angegebene modellspezifische Grenze erfüllen. Die Anfragebeispiele oben auf dieser Seite zeigen mehrere Bild-URLs für HappyHorse 1.1 und mehrere Datei-Uploads für beide Modelle. Um den Anfangsframe festzulegen, senden Sie first_frame einmal mit einer öffentlich zugänglichen HTTPS-Bild-URL oder einer Bilddatei. Verwenden Sie dieses Feld in einer separaten Anfrage von input_reference.

Dauer und Größe festlegen

Wählen Sie einen exakten WxH-Wert für size aus der Tabelle unten. Bei Anfragen mit erstem Frame bestimmt das Bild den Bildausschnitt und das Seitenverhältnis, während size die Ausgabestufenauflösung auswählt.

Task-Ablauf

1

Task erstellen

Senden Sie die Multipart-Formularanfrage und speichern Sie id.
2

Task abfragen

Rufen Sie Ein HappyHorse-Video abrufen auf, bis status den Wert completed, failed oder error hat.
3

Ergebnis herunterladen

Wenn die Aufgabe completed ist, rufen Sie HappyHorse-Videoinhalte abrufen auf, um die MP4-Datei herunterzuladen.

Autorisierungen

Authorization
string
header
erforderlich

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
enum<string>
erforderlich

HappyHorse model ID for this endpoint.

Verfügbare Optionen:
happyhorse-1.0,
happyhorse-1.1
Beispiel:

"happyhorse-1.1"

prompt
string
erforderlich

Text prompt that describes the video to generate. For image inputs, describe the motion and visual details to preserve.

Beispiel:

"Use the uploaded reference image as the visual guide. Create a short cinematic shot with gentle natural motion."

seconds
integer
Standard:5

Requested clip duration in whole seconds. Send an integer from 3 through 15 as a form field. The default is 5.

Erforderlicher Bereich: 3 <= x <= 15
Beispiel:

3

size
string

Output size as an exact WxH value. Use one of the documented size values for the selected HappyHorse model. For first-frame requests, size selects the resolution tier; the image determines the framing and aspect ratio.

Beispiel:

"1920x1080"

input_reference

Reference images for reference-to-video. Send 1–9 publicly accessible HTTPS image URLs or 1–9 uploaded image files by repeating input_reference once per image. Use only URLs or only files within this field; do not join URLs with commas. Reference images guide subjects and visual details. CometAPI preserves image order. Use JPEG, JPG, PNG, or WEBP images with a shortest side of at least 400 px. Each reference image must be at or below 10 MB for happyhorse-1.0 or 20 MB for happyhorse-1.1. These model limits apply to both image URLs and uploaded files. The input_reference file upload limit is 20 MiB (20 x 1024 x 1024 bytes) per file. Keep uploads within the model limit as well. Keep this field separate from first_frame.

Pattern: ^https://
first_frame

Opening-frame image as one publicly accessible HTTPS URL or one image file. Send this field once, using either a URL or a file. Use JPEG, JPG, PNG, or WEBP images up to 20 MB. Do not combine first_frame with input_reference.

Pattern: ^https://

Antwort

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
erforderlich

Task ID. Use this value with retrieve and content endpoints.

Beispiel:

"task_example"

object
string
erforderlich

Object type. Video tasks return video.

Beispiel:

"video"

model
string
erforderlich

Model ID used for the task.

Beispiel:

"happyhorse-1.1"

status
enum<string>
erforderlich

Task lifecycle status. Poll until the value is completed, failed, or error.

Verfügbare Optionen:
queued,
in_progress,
completed,
failed,
error
Beispiel:

"queued"

progress
integer
erforderlich

Task progress as a coarse percentage.

Erforderlicher Bereich: 0 <= x <= 100
Beispiel:

0

created_at
integer
erforderlich

Task creation time as a Unix timestamp in seconds.

Beispiel:

1779938152

task_id
string

Compatibility alias for id when present.

Beispiel:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

Beispiel:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

Beispiel:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Zuletzt geändert am 9. September 2026