seedinteger
Random seed for reproducibility.
न्यूनतम: 0
अधिकतम: 2147483647
alibaba/wan/2.2/animate/replaceWan 2.2 Animate Replace replaces the person in the reference video with the character from the image.
model को आज़माएँ
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
आप आगे क्या करना चाहेंगे?
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"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.
बिल्डिंग शुरू करें
इस model को 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"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
seedintegerRandom seed for reproducibility.
न्यूनतम: 0
अधिकतम: 2147483647
imagestringआवश्यकInput image URL (face / character).
videostringआवश्यकReference video.
use_turbobooleanFaster generation with quality enhancement.
डिफ़ॉल्ट: false
resolutionstringOutput resolution.
डिफ़ॉल्ट: "720p"
संभावित मान: "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"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"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"
}
]