Skip to content

Happy Horse Video Edit

POST/v1/run

Happy Horse Video Edit by Alibaba - AI-powered video editing and transformation. Apply style transfer, motion control, lip-sync, and visual effects to existing videos with natural language instructions.

Request body

Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.

stringmodelrequired

Model identifier. Set to alibaba/happy-horse/video-edit.

Default: alibaba/happy-horse/video-edit

stringpromptrequired

Text prompt describing the desired edit. Reference any supplied reference images using @Image1, @Image2, ... up to @Image5. Max 2500 characters.

Optional<string>video

URL of the source video to edit. Formats: MP4, MOV (H.264 recommended). Duration: 3-60 s. Longer side ≤ 2160 px, shorter side ≥ 320 px. Aspect ratio between 1:2.5 and 2.5:1. Frame rate > 8 fps. Max 100 MB. The output video preserves the source aspect ratio. Output duration matches the input video, capped at 15 s (longer inputs are truncated to the first 15 s). Max file size: 100.0MB, Min duration: 3s, Max duration: 60s, Timeout: 30.0s

Optional<string>resolution

Output video resolution tier.

Allowed values: 720p, 1080p

Default: 1080p

Optional<integer>seed

Random seed for reproducibility (0-2147483647).

Optional<array<string>>reference_image_urls

Optional reference images used to guide the edit (up to 5). Formats: JPEG, JPG, PNG, WEBP. Dimensions must be at least 300px. Aspect ratio between 1:2.5 and 2.5:1. Max 10 MB each.

Optional<string>audio_setting

Audio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve the original audio from the input video.

Allowed values: auto, origin

Default: auto

Response Schema

The submit endpoint returns an accepted generation task. Poll the result endpoint with the returned id for terminal outputs or errors.

Optional<string>error

Error message if the task failed. Empty on success.

stringidrequired

Unique identifier for the generation task.

Optional<string>model

Model ID used for the prediction.

Optional<array>outputs

Array of generated content. Empty when status is not completed.

stringstatusrequired

Status of the task: pending, running, completed, failed, or timeout.

Allowed values: pending, running, completed, failed, timeout

Model capabilities

array<string>capability_tagsrequired

Capabilities declared by the model registry.

Default: video-to-video

stringexecution_moderequired

Execution mode declared by the model registry.

Default: async