Bir HappyHorse videosunu alın
Görev ID’sine göre bir HappyHorse video görevini; durum, ilerleme, zaman damgaları ve tamamlanan video URL’si dahil olmak üzere alın.
video_url değerini içerir.
Bu alanları kontrol edin
status, görevinqueued,in_progress,completed,failedveyaerrordurumda olup olmadığını belirtir.progress, yaklaşık bir tamamlanma yüzdesidir.video_url, tamamlanmış yanıtlarda görünür.error, bir görev başarısız olduğunda görünür.
Polling akışı
Önce görevi oluşturun
id değerini saklayın.Görev ID’sine göre poll edin
status, completed, failed veya error değerine ulaşana kadar görev ID’sini bu endpoint’e gönderin.MP4 dosyasını indirin
status değeri completed olduğunda, HappyHorse video içeriğini alın çağrısını yapın.Yetkilendirmeler
Bearer authentication. Use your CometAPI API key.
Yol Parametreleri
Task ID returned by POST /v1/videos.
Yanıt
Current HappyHorse video task state.
Task ID. Use this value as task_id in retrieve and content requests.
"task_example"
Object type. HappyHorse video tasks return video.
"video"
Model ID used for the task.
"happyhorse-1.0"
Task lifecycle status. Poll until the value is completed, failed, or error.
queued, in_progress, completed, failed, error "queued"
Task progress as a coarse percentage.
0 <= x <= 1000
Task creation time as a Unix timestamp in seconds.
1779938152
Compatibility alias for id. The value matches id when present.
"task_example"
Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.
1779938219
Temporary video delivery URL. This field appears on completed tasks.
"<temporary-video-url>"
Failure details. This field appears when the task fails.