Skip to main content
POST
Use this endpoint to create a HappyHorse video task. The API returns a task ID immediately, so store the returned id and poll the task until it reaches a terminal status. POST /v1/videos uses multipart/form-data; pass scalar controls as form fields and reference images as input_reference file fields.

Choose an input mode

For reference-to-video, upload 1-9 reference images by repeating the input_reference multipart field. CometAPI sends each uploaded file as a HappyHorse reference image. Use JPEG, JPG, PNG, or WEBP images up to 20 MB each; for best results, use images with a shortest side of at least 400 px.

Set duration and size

Set size to an exact WxH value.

Task flow

1

Create the task

Send the multipart form request and store the returned id.
2

Poll the task

Call Retrieve a HappyHorse video until status is completed, failed, or error.
3

Download the result

When the task is completed, call Retrieve HappyHorse video content to download the MP4 file.

Authorizations

Authorization
string
header
required

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
enum<string>
required

HappyHorse model ID for this endpoint.

Available options:
happyhorse-1.0,
happyhorse-1.1
Example:

"happyhorse-1.1"

prompt
string
required

Text prompt that describes the video to generate. For reference-image requests, combine the prompt with the uploaded reference image.

Example:

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

seconds
string

Requested clip duration in seconds. Use an integer from 3 through 15. Default is 5.

Example:

"3"

size
string

Output size as an exact WxH value. Use one of the documented size values for the selected HappyHorse model.

Example:

"1920x1080"

input_reference
file

Reference image file for reference-to-video. Required when using reference-to-video; repeat this multipart field to send additional reference images. CometAPI preserves upload order. Use JPEG, JPG, PNG, or WEBP images up to 20 MB each.

Response

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

id
string
required

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

Example:

"task_example"

object
string
required

Object type. Video tasks return video.

Example:

"video"

model
string
required

Model ID used for the task.

Example:

"happyhorse-1.1"

status
enum<string>
required

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

Available options:
queued,
in_progress,
completed,
failed,
error
Example:

"queued"

progress
integer
required

Task progress as a coarse percentage.

Required range: 0 <= x <= 100
Example:

0

created_at
integer
required

Task creation time as a Unix timestamp in seconds.

Example:

1779938152

task_id
string

Compatibility alias for id when present.

Example:

"task_example"

completed_at
integer

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

Example:

1779938219

video_url
string

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

Example:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.