seedinteger
Random seed for reproducibility.
Minimo: 0
Massimo: 2147483647
alibaba/wan/2.2/animate/replaceWan 2.2 Animate Replace replaces the person in the reference video with the character from the image.
Prova il modello
PNG, JPEG, WebP o GIF · massimo 20 MiB
Cosa vuoi fare dopo?
Seleziona un esempio per caricare i suoi input e il risultato nel playground.
{
"image": "https://static.sandbase.ai/examples/874ae93a-9288-40dc-b214-6c73426b2d22/input/e9a4fdfa-de1e-494c-a286-70452a235cf1.png",
"video": "https://static.sandbase.ai/examples/874ae93a-9288-40dc-b214-6c73426b2d22/input/c93e1785-2391-4b49-805a-bd2bfe345c93.mp4"
}Swap the person in a reference video for the character in image. Motion, camera, and scene come from the video; the new character's look comes from the picture, relit to fit the scene.
| Field | Type | Default | Notes |
|---|---|---|---|
image | image URL, required | — | Character image. JPEG, PNG, or WebP URL. |
video | video URL, required | — | Reference video that supplies the motion. |
resolution | 480p / 580p / 720p | 720p | Sets the rate. |
use_turbo | boolean | false | Faster generation at some quality cost. |
seed | integer 0–2147483647 | random | Fix it to compare prompt changes. |
Billing follows the upstream unit: output seconds counted at 16 frames per second, so a 30fps output bills about 1.9× its wall-clock length. Rates per counted second: $0.04 at 480p, $0.06 at 580p, $0.08 at 720p. The quote before submission assumes a 5-second, 30fps result; the final charge uses the measured output.
| Output | 480p | 580p | 720p |
|---|---|---|---|
| 5s at 30fps | $0.375 | $0.5625 | $0.75 |
| 10s at 30fps | $0.75 | $1.125 | $1.50 |
| 10s at 16fps | $0.40 | $0.60 | $0.80 |
Failed runs are not charged.
Other Wan 2.2 endpoints: alibaba/wan/2.2/animate/move, alibaba/wan/2.2/speech-to-video.
Inizia a costruire
Invia questo modello tramite la SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "alibaba/wan/2.2/animate/replace",
"image": "https://static.sandbase.ai/examples/alibaba/wan/2.2/animate/replace/input_image_0.png",
"video": "https://static.sandbase.ai/examples/alibaba/wan/2.2/animate/replace/input_video_1.mp4",
"use_turbo": false,
"resolution": "720p"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Crea una SandBase API key e impostala nell'ambiente del server. Tutte le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la key sul server. Non esporla nel codice del browser né committarla in un repository.
Esegui POST su /v1/run con questo ID modello e i relativi input. L'esempio di richiesta sopra include invio e polling.
Usa il run ID restituito per fare polling finché lo stato non è completed, failed o timeout. Leggi l'output solo dopo completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passa un URL di file accessibile pubblicamente nel campo image, video o audio del modello. I formati supportati e i limiti sono mostrati accanto a ciascun input del Playground.
Usa il controllo upload o replace sui campi immagine supportati nel Playground. I campi URL video accettano un video di driving ospitato; non implicano il supporto al caricamento video.
seedintegerRandom seed for reproducibility.
Minimo: 0
Massimo: 2147483647
imagestringobbligatorioInput image URL (face / character).
videostringobbligatorioReference video.
use_turbobooleanFaster generation with quality enhancement.
Predefinito: false
resolutionstringOutput resolution.
Predefinito: "720p"
Valori possibili: "480p", "580p", "720p"
{
"model": "alibaba/wan/2.2/animate/replace",
"image": "https://static.sandbase.ai/examples/alibaba/wan/2.2/animate/replace/input_image_0.png",
"video": "https://static.sandbase.ai/examples/alibaba/wan/2.2/animate/replace/input_video_1.mp4",
"use_turbo": false,
"resolution": "720p"
}Un run completato espone il risultato in output. Quanto segue è l'esempio salvato del modello, non una nuova generazione.
[
{
"poster": "https://static.sandbase.ai/examples/posters/4d5a028d71443e685f77.jpg",
"source": "Alibaba Model Studio schema mirror",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/",
"url": "https://static.sandbase.ai/examples/874ae93a-9288-40dc-b214-6c73426b2d22/output/a33829fd-db96-4b56-9675-74ed689de1e0.mp4"
}
]