Notice: Black Friday 2026 × Cyber Monday: Get up to 30% extra on top-ups, DeepSeek free to use · View the promotion
Blog

Guide

Wan 2.2 Animate/Replace Getting Started Guide: Video-to-Video Capability Boundaries, Pricing, and Integration Practices

From capability assessment to cost estimation: a video-to-video integration checklist for developers

Nov 25, 2026
深炭底色上横贯一道琥珀色光带,辅以低饱和几何色块的抽象封面图。
On this page

First, understand what problem it solves: the positioning of video-to-video

If you are looking for a model that takes a sentence as input and outputs a video, then wan-2.2-animate/replace is not that. Its capability tag is video-to-video, its output type is video, and its provider is Alibaba. In other words, you first need a video that has already been shot, generated, or taken from a stock library; the model's job is to transform that video rather than generate footage from scratch.

This distinction looks simple, but it has a big engineering impact:

  • Different inputs: For text-to-video, the core input is the prompt; for video-to-video, the core input is the video itself. Your system must already have a complete asset pipeline for upload, storage, transcoding, and validation.
  • Different failure modes: When text-to-video falls short, you usually adjust the prompt; when video-to-video falls short, the problem is more likely in the input video's specifications, duration, or content complexity.
  • Different cost structure: Text-to-video billing is often tied to resolution and steps, whereas this type of model is billed by video seconds, so cost grows linearly with duration. That makes "cut it short first, then test" the most effective way to save money.

So the first question before integration is not "is this model good?" but "is my scenario about transforming an existing video?" Typical matching scenarios include replacing the motion or appearance of people in existing footage, reinterpreting existing clips, and producing multiple variants in bulk from the same source clip. If your need is to go straight from copy to finished video, you should first pick a text-to-video model from the model list, get that pipeline working, and only then consider whether you need video-to-video for post-processing.

Once the positioning is clear, integration costs are easier to estimate: you are evaluating not just an API call, but a pipeline that includes asset preprocessing, model invocation, and result delivery.

On a dark gray background, an amber band of light crosses the frame; on the left, a group of video frames passes through a geometric transformation node in the middle and becomes transformed video frames on the right, while a dimmer parallel branch suggests text-to-video.
The input video passes through a transformation node to produce a transformed video, contrasted with the parallel path of text-to-video—a visual illustration of the video-to-video positioning.

Capability boundaries: what it can change and what it cannot promise

Based on the available information, there are only a few established facts about wan-2.2-animate/replace: provider Alibaba, output video, and capability video-to-video. The name’s animate and replace suggest two directions—driving-type transformations that make the footage "move," and reshaping-type transformations that replace elements in the frame. However, the specific replacement granularity, the supported range for people/objects/backgrounds, and the resolution and duration limits must be based on the official API documentation; this article does not make promises on the documentation's behalf.

Here is a pragmatic framework for understanding the boundaries:

What you can expect it to do: Accept an input video, transform the visual content according to request parameters, and return a new video. The semantics of the transformation are defined by the model; your job is to choose the right parameters and prepare the input.

What you should not promise by default:

  • It does not guarantee frame-by-frame alignment with the original, nor that audio will be preserved or remixed—whether the output has an audio track depends on the documentation.
  • It does not guarantee stable results for arbitrary inputs; input video sharpness, composition, and motion amplitude can all affect output quality.
  • It does not guarantee that the output resolution matches the original; specifications are subject to the documentation.
  • It does not guarantee reversibility or precise control over local regions unless the documentation explicitly supports region/mask parameters.

For product teams, this means launch copy should avoid phrases like "perfect replacement" or "lossless transformation"; for engineering teams, it means acceptance must include manual spot checks rather than just checking for an HTTP 200 response.

A practical approach: before formal scheduling, run an exploratory round of calls with 2–3 of the most typical assets in your business, and archive the results as a baseline for later acceptance. The call fees spent on this step are far cheaper than rework after launch.

On a warm charcoal background, an amber band of light cuts diagonally across the frame; the blocks on the left are transformed while the blocks on the right remain unchanged, illustrating capability boundaries.
On either side of the light band: the motion and appearance that can be transformed, and the parts that remain outside the boundary.

Billing structure: how to convert $0.0429 per second into a budget

This model is priced at $0.0429 per second, billed by the number of seconds in the output video (refer to the billing notes in the official documentation). This basis leads to two direct conclusions.

First, cost is linearly related to duration. A 10-second clip and a 60-second clip differ in cost by 6 times. The budget formula is simple:

Cost per call ≈ $0.0429 × video seconds
Batch cost ≈ cost per call × number of calls

Second, short assets are a natural cost-control lever. Do not test parameters on long videos. Cut a 60-second asset into 5–10 second clips for parameter experiments; the cost per call drops by an order of magnitude, while the number of experiment rounds can multiply several times over.

When budgeting by duration tiers, bucket according to your actual business distribution rather than using an average. For example, if 80% of your product's requests are short videos under 15 seconds and only a small number are long videos, then estimating with "average duration × call volume" will be inaccurate. A more reliable approach is:

  1. List your business's duration distribution (e.g., ≤10s, 10–30s, 30–60s).
  2. Multiply each tier by its corresponding call volume to get total seconds.
  3. Multiply total seconds by the per-second unit price to get the baseline budget.
  4. Add a retry factor—debugging and failed retries both incur actual charges; whether failed requests are billed depends on the documentation, but it is always right to leave headroom in the budget.

One more easily overlooked point: acceptance spot checks also generate calls. After running batches in production, if you want quality feedback loops, the spot-check requests also count toward costs, so do not omit them when planning.

For real-time prices and the latest billing rules, refer to the site's pricing panel and model page; this article only discusses the conversion method.

On a warm charcoal background, five horizontal bars of increasing height are evenly spaced, an amber band of light sweeps diagonally across, and there is a thin horizontal line at the bottom.
The bars rise as seconds increase, and a diagonal light sweeps across: cost accumulates approximately linearly with video duration.

Integration workflow: from key configuration to the first successful call

The integration path can be broken into five fixed steps; do not skip the order.

Step one: confirm the model identifier and availability. Check the current status, input/output specifications, and parameter list of wan-2.2-animate/replace on the model page. The model page is your only source of truth for parameters.

Step two: configure the key. Store the key only in server-side environment variables; never put it in the frontend bundle or commit it to the repository. Use .env locally and the platform's secret management capability in production.

Step three: prepare and validate the input. Start with a short, simple video you shot yourself—one person, clean background, a few seconds is enough. After uploading, confirm you have an accessible asset reference (file ID or URL), and check whether the format and duration meet the documentation requirements.

Step four: construct and submit the request. The request body should contain at least the model identifier and video input; fill in default values for other parameters per the documentation. For the first call, do not customize a bunch of parameters—get the pipeline working first.

Step five: poll or receive the result. Video tasks usually do not return synchronously; you need to obtain task status in the way specified by the documentation, and immediately copy the final artifact URL to your own storage rather than relying on temporary links long-term.

A minimal working call example (parameter names are subject to the documentation; this only illustrates the structure):

curl -X POST "$HIAPI_BASE_URL/v1/video/generations" \
  -H "Authorization: Bearer $HIAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan-2.2-animate/replace",
    "video": "<your-video-reference>"
  }'

Once it works, do two more things: wrap the call into a function with timeouts and retries; log the request ID, duration, input length, and output URL. You will rely on these logs for troubleshooting and cost calculation later.

Parameter and input design: key choices that affect results and costs

The core principle of parameter design is just one thing: manage the input video well first, then talk about parameter tuning. Input quality usually has a greater impact on results than parameter fine-tuning, and input specifications directly determine cost.

Things worth fixing first at the input video level:

  • Duration: Cut to the shortest usable duration for your business. Every trim that saves money during debugging is a real cost reduction.
  • Resolution and bitrate: Do not blindly upload original high-bitrate assets; normalize to the specifications recommended in the documentation first. Too large may be rejected or slow down processing; too small loses detail.
  • Composition and subject proportion: If the subject is too small or the frame is too cluttered, transformation tasks are more likely to go out of control. This should be reflected in the choice of first-test assets.
  • Frame rate and encoding: Standardize to the container and codec recommended in the documentation to reduce a whole class of mysterious failures.

Trade-off thinking at the request parameter level:

Divide parameters into two categories. One is "semantic parameters"—they determine which direction the model transforms, and these are worth spending time testing. The other is "quality parameters"—they determine output sharpness, smoothness, and so on; these are usually positively correlated with cost or latency, so they should be raised only after quality acceptance passes, not maxed out from the start.

For experiments, use the single-variable method: fix the input video and all other parameters, change only one parameter at a time, and save the results for comparison. This gives you a reusable parameter–result table instead of a pile of samples with unclear causality. Record the input seconds for each combination so you can calculate the cost of that experiment round afterward.

As for which parameters exist, their value ranges, and which are required, everything is subject to the official API documentation. Do not guess and send parameters that are not documented; extra fields may cause the request to be rejected outright.

Result acceptance and common troubleshooting

Acceptance criteria should be defined before writing code; otherwise it is easy to fall into vague judgments like "looks okay."

Recommended acceptance dimensions:

  • Task success rate: Whether the API reliably returns artifacts, measured per request.
  • Content conformance: Whether the transformation direction meets expectations, scored via spot checks rather than reviewing everything by eye.
  • Technical metrics: Whether output duration matches input, whether there is obvious frame skipping/flicker, and whether the audio track meets expectations (subject to the documentation).
  • Cost metrics: The average seconds cost per successful output; this number reflects real cost better than the unit price.

Common issues and troubleshooting order (from cheap to expensive; do not start by changing parameters):

  1. Request rejected: First check the key, model identifier spelling, missing required fields, and field types. These errors do not incur video costs; fix and retry.
  2. Input validation failure: Check whether format, codec, duration, and resolution are within the documentation's allowed range. The vast majority of "it won't run" cases die here.
  3. Task timeout or no result for a long time: Confirm that the polling cadence follows the documentation's recommendations to avoid overly frequent requests; also confirm that the asset reference is reachable by the server—expired links are a frequent cause.
  4. Result exists but quality is below expectations: Troubleshoot in the order "change input → change semantic parameters → change quality parameters." First retest with the ideal asset you have confirmed; if that also fails, the issue is in the parameters or the model's capability boundary, not your business assets.
  5. Results inconsistent: Most likely caused by input differences. Put failure samples and success samples side by side and look for commonalities—is the subject too small, the motion too fast, or the background too cluttered?

Record the input, parameters, and returned error code for each failure in a table; after two weeks you will have a troubleshooting manual for your own business, more useful than any generic documentation.

Composition and rollout: integrating video transformation into your existing product pipeline

Getting a single model call working is only the starting point. To make it truly usable in a product, you need to place it in a complete pipeline:

Upload → preprocessing → video transformation → result validation → storage → distribution

Each link involves engineering decisions:

  • Integrator: Raw assets uploaded by users are often non-compliant; the preprocessing layer trims duration, standardizes encoding, and normalizes specifications. When this layer is done well, the model-side failure rate drops noticeably.
  • Transformation step: Integrate it as a task node in the pipeline, executed asynchronously via a queue to avoid blocking request threads. Task status must be visible to the frontend so users know the progress.
  • Result validation: Automatically check whether the artifact exists and whether the duration is reasonable; if it fails, route it to a manual spot-check queue rather than delivering it directly to users.
  • Storage and distribution: Copy artifacts to your own object storage; temporary links are only an intermediate state. Subsequent distribution, CDN, and watermarking all happen in your pipeline.

Combining with other capabilities is also a natural extension. For example, first use a text-to-video model to generate a base clip, then use wan-2.2-animate/replace for secondary transformation; or add a quality enhancement/super-resolution step after transformation. The value of such combinations is that each stage can be replaced and priced independently, with a clear cost structure.

Canary rollout and scale-up: Start with small-traffic batches and monitor success rate and seconds cost, then increase concurrency after stabilization. During scale-up, pay close attention to queue time—video tasks usually take much longer to process than text tasks, so concurrency strategy should be designed based on processing time rather than request count.

Budget guardrails: Add a duration cap and a daily call volume cap on the business side to prevent anomalous requests from blowing the budget. Set guardrail thresholds based on the duration distribution you measured earlier; that is more accurate than guessing.

The model page can serve as a standing reference for parameters and specifications: wan-2.2-animate/replace.

Break integration into three stages—input validation, parameter experiments, and result acceptance—and then budget by seconds, and you will find that video-to-video is not as hard to control as you might think. What is hard is resisting the urge to debug on long videos.

Related articles

View all articles →

Start building with persistent AI artifacts

Get your API key and call image, video and audio models through one task-based API.

Read the API docs