Skip to main content
POST
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the result through the unified Query Task Status endpoint.
happy-horse supports text-to-video, image-to-video, reference-to-video, and video-edit through one public model ID.

Models

  • happy-horse - Alibaba Happy Horse 1.0 video generation and editing

Input modes

Text to Video

Send a prompt without image or video input fields. Use aspect_ratio, resolution, and duration to control the output.

Image to Video

Send a single-item image_urls array. The image is used as the first frame. prompt is optional in this workflow.

Reference to Video

Send reference_image_urls with 1-9 images and a required prompt. Reference the images in prompt text as character1, character2, and so on, matching the order of reference_image_urls. Do not combine reference_image_urls with image_urls.

Video Edit

Send video_url with a required edit prompt. Optional reference_image_urls can guide the edit; refer to them as @Image1, @Image2, and so on. audio_setting controls whether Happy Horse decides audio handling automatically or preserves the original audio. The source video must be 3-60 seconds. Output follows the source video and truncates longer input to the first 15 seconds.

Required parameters

  • model: happy-horse
  • input.prompt: Required for text-to-video, reference-to-video, and video-edit. Optional for image-to-video. Maximum length is 5,000 non-Chinese characters or 2,500 Chinese characters.
  • input.video_url: Required for video-edit.
  • input.reference_image_urls: Required for reference-to-video.

Optional parameters

  • image_urls: Single-item first-frame image URL array for image-to-video
  • reference_image_urls: 1-9 images for reference-to-video, or up to 5 optional images for video-edit
  • aspect_ratio: Text-to-video and reference-to-video only. 16:9, 9:16, 1:1, 4:3, or 3:4. Default is 16:9
  • resolution: 720p or 1080p. Default is 1080p
  • duration: Integer seconds from 3 to 15 for text-to-video, image-to-video, and reference-to-video. Ignored for video-edit
  • audio_setting: Video-edit only. auto or origin. Default is auto
  • seed: Optional integer from 0 to 2147483647
  • enable_safety_checker: Optional boolean

Notes

  • image_urls must resolve to exactly one image and is only for image-to-video.
  • reference_image_urls selects reference-to-video unless video_url is present, in which case it is treated as optional video-edit reference imagery.
  • For text-to-video and reference-to-video, omit video_url and use aspect_ratio.
  • For video-edit, omit duration; the backend probes the source video duration for validation.

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

Body

application/json
model
enum<string>
required

Happy Horse model identifier

Available options:
happy-horse
input
object
required
callback_url
string<uri>

Webhook callback URL for result notifications

Example:

"https://your-domain.com/callback"

Response

200 - application/json

Task submitted successfully

code
integer
required
Example:

200

data
object
required