Skip to main content
POST
Metinden, referans görsellerden veya bir açılış karesinden HappyHorse videosu oluşturun. API hemen bir görev kimliği döndürür. Görevi yoklamak ve tamamlanan videoyu indirmek için döndürülen id değerini saklayın. POST /v1/videos multipart/form-data kullanır. Kontrolleri form alanları olarak, referans görselleri ise her alan başına bir HTTPS URL’si veya yüklenmiş görsel dosyasıyla input_reference alanları olarak gönderin.

Bir giriş modu seçin

Referans görseller, videodaki özneleri ve görsel ayrıntıları yönlendirir. Her görsel için bir kez input_reference tekrarlayarak, herkese açık 1–9 HTTPS görsel URL’si veya 1–9 görsel dosyası gönderin. Bu alan içinde yalnızca URL’leri veya yalnızca dosyaları kullanın. URL’leri virgülle birleştirmek yerine her birini ayrı ayrı gönderin. input_reference için her referans görseli, happyhorse-1.0 ile birlikte en fazla 10 MB olmalıdır. happyhorse-1.1 ile her referans görseli en fazla 20 MB olmalıdır. Bu model sınırları hem görsel URL’leri hem de yüklenen dosyalar için geçerlidir. En kısa kenarı en az 400 px olan JPEG, JPG, PNG veya WEBP görseller kullanın. input_reference yükleme sınırı, dosya başına 20 MiB’dir (20 × 1024 × 1024 bayt). Yüklenen görseller ayrıca yukarıdaki modele özgü sınırı da karşılamalıdır. Bu sayfanın üst kısmındaki istek örnekleri, HappyHorse 1.1 için birden fazla görsel URL’si ve her iki model için birden fazla dosya yüklemesi gösterir. Açılış karesini ayarlamak için, herkese açık bir HTTPS görsel URL’si veya bir görsel dosyasıyla first_frame değerini bir kez gönderin. Bu alanı input_reference alanından ayrı bir istekte kullanın.

Süreyi ve boyutu ayarlayın

Aşağıdaki tablodan WxH için tam bir size değeri seçin. İlk kare isteklerinde görsel, çerçevelemeyi ve en-boy oranını belirlerken size çıkış çözünürlüğü katmanını seçer.

Görev akışı

1

Görevi oluşturun

Çok parçalı form isteğini gönderin ve döndürülen id değerini saklayın.
2

Görevi yoklayın

Çağırın Bir HappyHorse videosunu alın status, completed veya failed olana kadar çağırın: error.
3

Sonucu indirin

Görev completed olduğunda, HappyHorse video içeriğini alın MP4 dosyasını indirmek için çağırın.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer authentication. Use your CometAPI API key.

Gövde

multipart/form-data
model
enum<string>
gerekli

HappyHorse model ID for this endpoint.

Mevcut seçenekler:
happyhorse-1.0,
happyhorse-1.1
Örnek:

"happyhorse-1.1"

prompt
string
gerekli

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

Örnek:

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

seconds
integer
varsayılan:5

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

Gerekli aralık: 3 <= x <= 15
Örnek:

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.

Örnek:

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

Yanıt

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

id
string
gerekli

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

Örnek:

"task_example"

object
string
gerekli

Object type. Video tasks return video.

Örnek:

"video"

model
string
gerekli

Model ID used for the task.

Örnek:

"happyhorse-1.1"

status
enum<string>
gerekli

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

Mevcut seçenekler:
queued,
in_progress,
completed,
failed,
error
Örnek:

"queued"

progress
integer
gerekli

Task progress as a coarse percentage.

Gerekli aralık: 0 <= x <= 100
Örnek:

0

created_at
integer
gerekli

Task creation time as a Unix timestamp in seconds.

Örnek:

1779938152

task_id
string

Compatibility alias for id when present.

Örnek:

"task_example"

completed_at
integer

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

Örnek:

1779938219

video_url
string

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

Örnek:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Son değiştirilme tarihi 9 Eylül 2026