/happyhorse/videos endpoint and the action parameter.
Application Process
To use the HappyHorse Videos API, first go to the Ace Data Cloud Console to obtain your API Token and keep it for later use.
If you have not yet logged in or registered, you will be automatically redirected to the login page where you will be invited to register and log in. After completion, you will automatically return to the current page.
One API Token can call all platform services; there is no need to apply separately for each service. Your first application includes free credits for a free trial; when credits are insufficient, you can recharge your general balance in the Console.
📘 Full documentation: HappyHorse Videos API →
Action Types
action determines the generation mode for this request:
generate: Text-to-video, the default action, supportshappyhorse-1.0-t2vandhappyhorse-1.1-t2v, and requiresprompt.image_to_video: First-frame image-to-video, supportshappyhorse-1.0-i2vandhappyhorse-1.1-i2v, and requiresimage_url.reference_to_video: Reference-image-to-video, supportshappyhorse-1.0-r2vandhappyhorse-1.1-r2v, and requirespromptand 1–9image_urls.video_edit: Video editing, supportshappyhorse-1.0-video-edit, and requirespromptandvideo_url; optionally, 0–5 reference images can be provided throughimage_urls.
video_edit currently only has happyhorse-1.0-video-edit.
Basic Usage
Text-to-video only requiresprompt. You can also specify parameters such as resolution, ratio, and duration:
success: Whether this request was successful.task_id: The task ID on the Ace Data Cloud side, which can be used to query task status.trace_id: The trace ID for this request, used for troubleshooting.data: Video result list.id: The task ID on the HappyHorse side.video_url: The CDN URL of the generated video.state: Task status, optionallypending/succeeded/error.duration: The billed video duration, in seconds; forvideo_edit, it is the combined duration of the input and output videos.resolution: Output resolution.ratio: Output aspect ratio.
First-Frame Image-to-Video
When usingimage_to_video, image_url will be used as the first frame of the video. The output aspect ratio will follow the first-frame image as closely as possible, so this action does not require ratio.
Reference-Image-to-Video
When usingreference_to_video, image_urls can include 1–9 reference images. You can use character1, character2, and similar references in the prompt to refer to images in the corresponding order.
Video Editing
The output duration and frame format ofvideo_edit inherit from the source video. Passing duration or ratio will not change them; the frame format of image-to-video also inherits from the source image. Editing fees are calculated based on the combined duration of the input and output videos.
When using video_edit, you must provide the video to be edited through video_url and the editing intent through prompt. Optional image_urls will be used as reference images, for example, for outfit changes, style transfer, or local replacement. audio_setting can optionally be auto or origin, where origin means keeping the original video audio.
Asynchronous Callback
Video generation requires a certain amount of processing time. If you do not wish to keep a long connection waiting, you can pass incallback_url. In this case, the API will immediately return task_id, and after the task is completed, it will POST the final result to this address:
"async": true, and then query the task result through the HappyHorse Tasks API.
Billing Information
HappyHorse charges based on output video duration and resolution:720P: as low as approximately $0.105 / second.1080P: as low as approximately $0.18 / second.video_edit: charged based on the combined duration of the input video and output video; the actual billable duration is subject to the statistics after task completion.
Error Handling
When there is an issue with the request, the API will return the corresponding error code and description. Common ones are as follows:400: Invalid request parameters, for example, the action does not match the model,prompt/image_url/video_urlis missing, ordurationexceeds the range of 3–15 seconds.401: Authentication failed; the token is invalid or does not match the API.403: Insufficient balance, or the prompt was rejected because it triggered content moderation.429: Requests are too frequent, triggering rate limiting; please try again later.500: Internal server error or generation failure.

