Langsung ke konten utama
POST
Buat video HappyHorse dari teks, gambar referensi, atau frame pembuka. API segera mengembalikan ID tugas. Simpan id yang dikembalikan untuk melakukan polling tugas dan mengunduh video yang telah selesai. POST /v1/videos menggunakan multipart/form-data. Kirim kontrol sebagai kolom formulir dan gambar referensi sebagai kolom input_reference, dengan satu URL HTTPS atau file gambar yang diunggah per kolom.

Pilih mode input

Gambar referensi memandu subjek dan detail visual dalam video. Kirim 1–9 URL gambar HTTPS yang dapat diakses publik atau 1–9 file gambar, dengan mengulangi input_reference satu kali untuk setiap gambar sesuai urutan gambar. Gunakan hanya URL atau hanya file dalam kolom ini. Kirim setiap URL secara terpisah, bukan dengan menggabungkan URL menggunakan koma. Untuk input_reference, setiap gambar referensi harus berukuran 10 MB atau kurang dengan happyhorse-1.0. Dengan happyhorse-1.1, setiap gambar referensi harus berukuran 20 MB atau kurang. Batas model ini berlaku untuk URL gambar dan file yang diunggah. Gunakan gambar JPEG, JPG, PNG, atau WEBP dengan sisi terpendek minimal 400 px. Batas unggahan input_reference adalah 20 MiB (20 × 1024 × 1024 byte) per file. Gambar yang diunggah juga harus memenuhi batas khusus model di atas. Contoh permintaan di bagian atas halaman ini menampilkan beberapa URL gambar untuk HappyHorse 1.1 dan beberapa unggahan file untuk kedua model. Untuk menetapkan frame pembuka, kirim first_frame sekali dengan satu URL gambar HTTPS yang dapat diakses publik atau satu file gambar. Gunakan kolom ini dalam permintaan terpisah dari input_reference.

Tetapkan durasi dan ukuran

Pilih nilai WxH yang tepat untuk size dari tabel di bawah. Untuk permintaan frame pertama, gambar menentukan pembingkaian dan rasio aspek, sedangkan size memilih tingkat resolusi output.

Alur tugas

1

Buat tugas

Kirim permintaan formulir multipart dan simpan id yang dikembalikan.
2

Polling tugas

Panggil Ambil video HappyHorse hingga status bernilai completed, failed, atau error.
3

Unduh hasil

Saat tugas berstatus completed, panggil Ambil konten video HappyHorse untuk mengunduh file MP4.

Otorisasi

Authorization
string
header
wajib

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
enum<string>
wajib

HappyHorse model ID for this endpoint.

Opsi yang tersedia:
happyhorse-1.0,
happyhorse-1.1
Contoh:

"happyhorse-1.1"

prompt
string
wajib

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

Contoh:

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

seconds
integer
default:5

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

Rentang yang diperlukan: 3 <= x <= 15
Contoh:

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.

Contoh:

"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://

Respons

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

id
string
wajib

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

Contoh:

"task_example"

object
string
wajib

Object type. Video tasks return video.

Contoh:

"video"

model
string
wajib

Model ID used for the task.

Contoh:

"happyhorse-1.1"

status
enum<string>
wajib

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

Opsi yang tersedia:
queued,
in_progress,
completed,
failed,
error
Contoh:

"queued"

progress
integer
wajib

Task progress as a coarse percentage.

Rentang yang diperlukan: 0 <= x <= 100
Contoh:

0

created_at
integer
wajib

Task creation time as a Unix timestamp in seconds.

Contoh:

1779938152

task_id
string

Compatibility alias for id when present.

Contoh:

"task_example"

completed_at
integer

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

Contoh:

1779938219

video_url
string

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

Contoh:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Terakhir diubah pada 9 September 2026