Перейти к основному содержанию
POST
Создайте видео HappyHorse из текста, референсных изображений или начального кадра. API немедленно возвращает идентификатор задачи. Сохраните возвращённый id, чтобы опрашивать задачу и скачать готовое видео. POST /v1/videos использует multipart/form-data. Передавайте элементы управления как поля формы, а референсные изображения — как поля input_reference; одно HTTPS URL или загруженный файл изображения на поле.

Выберите режим ввода

Референсные изображения определяют объекты и визуальные детали в видео. Передайте от 1 до 9 общедоступных HTTPS URL изображений или от 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 один раз с одним общедоступным HTTPS URL изображения или одним файлом изображения. Используйте это поле в отдельном запросе от input_reference.

Задайте длительность и размер

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

Поток задачи

1

Создайте задачу

Отправьте multipart-запрос формы и сохраните возвращённый 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 г.