---
title: "Happy Horse 1.0 - Edit video"
method: POST
path: "/v1/ai/video-edit/happy-horse-1"
tags: ["video-edit"]
---

# Happy Horse 1.0 - Edit video

`POST /v1/ai/video-edit/happy-horse-1`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/video-edit/happy-horse-1`
- Auth: API key in header `x-magnific-api-key`

Edit an existing video with natural-language instructions using Happy Horse 1.0, Alibaba's AI video editing model, optionally guided by up to 5 reference images.

**Editing modes:**
- **Instruction-based editing**: Provide `prompt` with editing instructions (e.g., "change the sky to sunset")
- **Reference-image editing**: Provide `prompt` and `image_urls`, then reference images from the prompt using `@Image1`..`@Image5` (1-based, in array order)

**Key features:**
- 720P and 1080P resolution support
- Up to 5 reference images
- Output is capped at 15 seconds
- Configurable audio handling: `auto` (regenerate when relevant) or `origin` (preserve input audio)

## Request body

- VideoEditRequest1: Edit an existing video using natural-language instructions with Happy Horse 1.0, optionally guided by up to 5 reference images. Reference images from the prompt using `@Image1`..`@Image5` tokens (1-based, in array order). Output is capped at 15 seconds.
  - `webhook_url` string, uri: Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
  - `video_url` string, uri, required: URL of the source video to be edited. **Supported formats:** MP4, MOV with H.264 codec **Duration:** between 3 and 60 seconds (the output is capped at 15 seconds) **Frame rate:** greater than 8 fps **Dimensions:** longer side at most 2160 px and shorter side at least 320 px **Aspect ratio:** between 1:2.5 and 2.5:1 **Maximum file size:** 100 MB
  - `prompt` string, required: Text prompt describing the desired editing instructions. To reference an image from `image_urls` inside the prompt, use the tokens `@Image1`..`@Image5` (1-based, matching the array order). **Example:** "Replace the background with a futuristic cityscape at night"
  - `image_urls` string[]: Up to 5 reference images that guide the edit. Reference them from the prompt using `@Image1`..`@Image5` (1-based, in array order). **Supported formats:** JPEG, JPG, PNG, WEBP **Minimum dimension:** 300 px **Aspect ratio:** between 1:2.5 and 2.5:1 **Maximum file size:** 10 MB per image
  - `resolution` '720P' | '1080P': Output video resolution: - `720P`: 720p HD (1280x720) - `1080P`: 1080p Full HD (1920x1080)
  - `audio_setting` 'auto' | 'origin': Audio handling mode for the edited video: - `auto`: The model decides whether to regenerate audio based on the prompt — if the prompt involves audio descriptions, audio may be regenerated; otherwise the original audio is preserved - `origin`: Force-preserve the input video's original audio without regeneration
  - `seed` integer: Random seed for reproducibility. Use the same seed with identical parameters to improve reproducibility (does not guarantee identical results). Leave unset for a random seed.

## Response `200`

OK - The task exists and the status is returned

- InlineObject4
  - `data` TaskDetail1, required
    - `task_id` string, uuid, required: Task identifier
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: Task status
    - `generated` string[], required

## Other responses

- `400`: Bad Request - The server could not understand the request due to invalid syntax.
- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
