Beta HappyHorse Videos API
https://api.worldai.chat/happyhorse/videos
Generate or edit HappyHorse videos from text, first frames, multiple reference images, or video, with synchronous, asynchronous, and callback delivery.
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 model name. Different actions only support the corresponding model family.
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
Output video resolution, optional 720P or 1080P.
ratiostring
Output video aspect ratio, applicable to generate and reference_to_video. image_to_video and video_edit will ignore this parameter and inherit the aspect ratio of the input image or input video, respectively.
durationinteger
Output video duration (seconds), with a value range of 3–15, applicable to generate, image_to_video, and reference_to_video. video_edit will ignore this parameter, and the output duration inherits the input video; editing is billed based on the combined duration of the input and output videos.
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
Asynchronous callback address. After setting, the interface will immediately return task_id, and after the task is completed, the result will be POSTed to this address.
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
Integration guide
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
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.