Aliyun Bailian | 阿里云百炼 icon

Aliyun Bailian | 阿里云百炼

Access Alibaba Cloud Aliyun Bailian video generation, editing, and task APIs.

Video → Animate Mix | 视频换人

AI-generated

Summary

Generate a video with replacement of a person's portrait by blending a provided portrait image into a background video using the Animate Mix model.

Inputs

  • Animate Mix Model (required) — Specify the Animate Mix model identifier to use for the blend process, defaulting to 'wan2.2-animate-mix'.
  • Background Video URL (required) — URL of the background video file (mp4 or mov) to use as the base, with file size ≤ 300 MB and duration ≤ 20 seconds.
  • Portrait Image URL (required) — URL of the replacement portrait image (JPG or PNG, minimum 512×512 pixels) to blend into the background video.
  • Mode — Choose between 'wan-std' (standard mode balancing generation speed and quality) and 'wan-pro' (professional mode prioritizing quality and detail). Defaults to 'wan-std'.
  • Check Portrait Image Quality — Toggle to run a server-side quality check on the portrait image before submission. Defaults to true.
  • Wait for Task Completion — Choose whether to wait and poll until the video generation task finishes or fail, or to return immediately with the task ID. Defaults to false.
  • Poll Interval (MS) — When waiting for task completion, how frequently (in milliseconds) to poll the task status. Defaults to 2000 ms.
  • Max Wait (Seconds) — Maximum time in seconds to wait while polling before timing out. Defaults to 600 seconds.

Output shape

a single record containing the processed video task result or the task ID if waiting is disabled

If 'Wait for Task Completion' is enabled, the operation polls the task endpoint using the specified interval and max wait time until success or failure; otherwise it returns immediately with the task ID. The input video must be within size and duration limits, and portrait image must meet resolution minimum.

Examples

Example 1: Replace a person's portrait in a background video

Provide URLs for a background video (≤300 MB, ≤20 seconds) and a high-resolution portrait image (≥512x512), select the Animate Mix model and mode, optionally enable image quality check, and decide whether to wait for task completion or return immediately.

Links

Discussion