Skip to main content
POST
Створіть відео HappyHorse з тексту, еталонних зображень або початкового кадру. API негайно повертає ідентифікатор завдання. Збережіть повернене значення id, щоб опитувати завдання та завантажити готове відео. POST /v1/videos використовує multipart/form-data. Надсилайте елементи керування як поля форми, а еталонні зображення — як поля input_reference, по одному URL HTTPS або завантаженому файлу зображення на поле.

Виберіть режим введення

Еталонні зображення визначають об’єкти й візуальні деталі у відео. Надішліть 1–9 загальнодоступних URL-адрес HTTPS зображень або 1–9 файлів зображень, повторюючи input_reference один раз для кожного зображення в порядку зображень. У цьому полі використовуйте лише URL-адреси або лише файли. Надсилайте кожну URL-адресу окремо, а не об’єднуйте URL-адреси комами. Для input_reference кожне еталонне зображення має бути розміром не більш як 10 МБ із happyhorse-1.0. Для happyhorse-1.1 кожне еталонне зображення має бути розміром не більш як 20 МБ. Ці обмеження моделі застосовуються як до URL-адрес зображень, так і до завантажених файлів. Використовуйте зображення JPEG, JPG, PNG або WEBP, найкоротша сторона яких становить щонайменше 400 пкс. Обмеження на завантаження input_reference становить 20 МіБ (20 × 1024 × 1024 байтів) на файл. Завантажені зображення також мають відповідати наведеному вище обмеженню для конкретної моделі. Приклади запитів у верхній частині цієї сторінки показують кілька URL-адрес зображень для HappyHorse 1.1 і кілька завантажень файлів для обох моделей. Щоб установити початковий кадр, надішліть first_frame один раз із однією загальнодоступною URL-адресою HTTPS зображення або одним файлом зображення. Використовуйте це поле в окремому запиті від input_reference.

Установіть тривалість і розмір

Виберіть точне значення WxH для size з таблиці нижче. Для запитів із першим кадром зображення визначає кадрування та співвідношення сторін, тоді як size вибирає рівень роздільної здатності вихідного матеріалу.

Потік завдання

1

Створіть завдання

Надішліть запит multipart form і збережіть повернене значення id.
2

Опитуйте завдання

Викличте Отримання відео HappyHorse доки status не набуде значення completed, failed або error.
3

Завантажте результат

Коли завдання має стан completed, викличте Отримання вмісту відео HappyHorse щоб завантажити файл MP4.

Авторизації

Authorization
string
header
обов'язково

Bearer authentication. Use your CometAPI API key.

Тіло

multipart/form-data
model
enum<string>
обов'язково

HappyHorse model ID for this endpoint.

Доступні опції:
happyhorse-1.0,
happyhorse-1.1
Приклад:

"happyhorse-1.1"

prompt
string
обов'язково

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

Приклад:

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

seconds
integer
за замовчуванням:5

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

Необхідний діапазон: 3 <= x <= 15
Приклад:

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.

Приклад:

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

Відповідь

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

id
string
обов'язково

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

Приклад:

"task_example"

object
string
обов'язково

Object type. Video tasks return video.

Приклад:

"video"

model
string
обов'язково

Model ID used for the task.

Приклад:

"happyhorse-1.1"

status
enum<string>
обов'язково

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

Доступні опції:
queued,
in_progress,
completed,
failed,
error
Приклад:

"queued"

progress
integer
обов'язково

Task progress as a coarse percentage.

Необхідний діапазон: 0 <= x <= 100
Приклад:

0

created_at
integer
обов'язково

Task creation time as a Unix timestamp in seconds.

Приклад:

1779938152

task_id
string

Compatibility alias for id when present.

Приклад:

"task_example"

completed_at
integer

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

Приклад:

1779938219

video_url
string

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

Приклад:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Останнє оновлення 9 вересня 2026 р.