# Happy Horse Video Edit > HappyHorse video editing supports advanced video editing through natural language instructions. It allows for local or global editing of video elements using up to 5 reference images. ## Overview - **Endpoint**: `https://api.runflow.io/v1/run/alibaba/happy-horse/video-edit` - **Model ID**: `alibaba/happy-horse/video-edit` - **Provider**: Alibaba - **License**: commercial - **Last Updated**: 2026-04-28 ## Pricing - **Base price**: $0.28/second - **Note**: Per second of edited video (720p baseline) ### Pricing rules - **resolution**: $0.56/second ## Input Schema ### `prompt` (string, required) Text prompt describing the desired edit. Reference any supplied reference images using @Image1, @Image2, ... up to @Image5. Max 2500 characters. ### `video_url` (video, required) 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). ### `audio_setting` (string, optional) Audio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve the original audio from the input video. - **Default**: `auto` ### `enable_safety_checker` (boolean, optional) Enable content moderation for input and output. - **Default**: `true` ### `reference_image_urls` (image_list, optional) 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. ### `resolution` (string, optional) Output video resolution tier. - **Default**: `1080p` ### `seed` (integer, optional) Random seed for reproducibility (0-2147483647). ## Usage Examples ### cURL ```bash curl -X POST https://api.runflow.io/v1/run/alibaba/happy-horse/video-edit \ -H "Authorization: Bearer $RUNFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A professional headshot, soft studio lighting", "video_url": "https://example.com/input.mp4" }' ``` ### Python ```python import requests response = requests.post( "https://api.runflow.io/v1/run/alibaba/happy-horse/video-edit", headers={"Authorization": "Bearer RUNFLOW_API_KEY"}, json={ "prompt": "A professional headshot, soft studio lighting", "video_url": "https://example.com/input.mp4", }, ) data = response.json() print(data["video"]["url"]) ``` ### JavaScript ```javascript const response = await fetch( "https://api.runflow.io/v1/run/alibaba/happy-horse/video-edit", { method: "POST", headers: { "Authorization": "Bearer RUNFLOW_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "A professional headshot, soft studio lighting", video_url: "https://example.com/input.mp4", }), } ); const data = await response.json(); console.log(data.video.url); ``` ## Additional Resources - [Playground](https://www.runflow.io/models/alibaba/happy-horse/video-edit) - [API Reference](https://www.runflow.io/models/alibaba/happy-horse/video-edit/api) - [Documentation](https://docs.runflow.io) - [OpenAPI](https://api.runflow.io/v1/openapi.json)