HappyHorse Videos API
POSThttps://api.acedata.cloud/happyhorse/videos

Request Headers

acceptstring
Specify the response format returned by the server. `application/x-ndjson` can be used for streaming progress responses.
Please select
authorizationstring
Bearer token

Request Body

actionstring
Operation types. `generate` is for generating video from text, `image_to_video` is for generating video from the first frame image, `reference_to_video` is for generating video from reference images, and `video_edit` is for video editing based on video and reference images.
modelstring
HappyHorse 模型名称。不同 action 仅支持对应模型族。
promptstring
Text prompt words. Text-to-video, reference image to video, and video editing scenarios are required.
image_urlstring
The input image URL for the first frame of the video. Only used by `image_to_video`.
image_urlsarray
Reference image URL array. `reference_to_video` supports 1–9 images, `video_edit` supports 0–5 images.
video_urlstring
URL of the video to be edited. For `video_edit` use only.
resolutionstring
输出视频分辨率,可选 720P 或 1080P。
ratiostring
Output video aspect ratio. Text-to-video and reference image-to-video support this parameter; the first frame image-to-video will follow the aspect ratio of the first frame image.
durationinteger
Output video duration (seconds), value range 3–15. The output duration of `video_edit` is determined by the input video.
watermarkboolean
Whether to add the HappyHorse watermark. Default is off.
Please select
audio_settingstring
Audio strategy for video editing. `auto` is determined by the model, `origin` retains the original audio of the input video.
Please select
seedinteger
Random seed, range 0–2147483647.
callback_urlstring
异步回调地址。设置后接口会立即返回 task_id,任务完成后将结果 POST 到该地址。
asyncboolean
When set to true, the interface immediately returns task_id, which can then be used to query the results through the Tasks API.
Please select

Response

HappyHorse Video
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.