video-edit

Happy Horse 1.0 - Edit video

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)
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

Request body

webhook_urlstring 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_urlstring 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

promptstring 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_urlsstring[]

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
seedinteger

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.

Example request

{
  "webhook_url": "https://www.example.com/webhook",
  "video_url": "https://example.com/input-video.mp4",
  "prompt": "Replace the background with a futuristic cityscape at night",
  "image_urls": [
    "https://example.com/reference1.jpg"
  ],
  "seed": 12345
}

Response

OK - The task exists and the status is returned

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.