seedinteger
Random seed for reproducibility.
Minimum: 0
Maksimum: 2147483647
alibaba/wan/2.2/speech-to-videoWan 2.2 Speech to Video turns a portrait image and a speech audio into a talking video guided by a prompt.
Coba model ini
PNG, JPEG, WebP, atau GIF ยท maksimum 20 MiB
Apa yang ingin Anda lakukan selanjutnya?
Pilih contoh untuk memuat input dan hasilnya ke playground.
{
"audio": "https://static.sandbase.ai/examples/1e330d15-cead-4a6f-95c7-573cdf0002b4/input/a299cae5-adf2-4f2e-a69b-110e1cf5d1a1.wav",
"image": "https://static.sandbase.ai/examples/1e330d15-cead-4a6f-95c7-573cdf0002b4/input/2e0cf355-04f3-49ac-9998-f9d7a51e8f19.png",
"prompt": "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard."
}Turn a portrait and a speech track into a talking video. Wan 2.2 lip-syncs the face in image to audio and animates head and body movement; the prompt sets the scene and gestures.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | โ | Text instruction. |
image | image URL, required | โ | Portrait to animate. JPEG, PNG, or WebP URL. |
audio | audio URL, required | โ | Speech track (WAV/MP3) that drives the lips. |
num_frames | integer 40โ120 | 80 | Frames to generate (40โ120, 16 frames per second of video). |
resolution | 480p / 580p / 720p | 720p | Sets the rate. |
negative_prompt | string | โ | What to avoid. |
seed | integer 0โ2147483647 | random | Fix it to compare prompt changes. |
Billed per output second at the upstream rate: $0.10 at 480p, $0.15 at 580p, $0.20 at 720p. The default 80 frames is 5 seconds.
| Output | 480p | 580p | 720p |
|---|---|---|---|
| 80 frames (5s, default) | $0.50 | $0.75 | $1.00 |
| 120 frames (7.5s) | $0.75 | $1.125 | $1.50 |
Failed runs are not charged.
Other Wan 2.2 endpoints: alibaba/wan/2.2/animate/move, alibaba/wan/2.2/animate/replace.
Mulai membangun
Kirim model ini melalui 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/speech-to-video",
"audio": "https://static.sandbase.ai/examples/alibaba/wan/2.2/speech-to-video/input_audio_1.wav",
"image": "https://static.sandbase.ai/examples/alibaba/wan/2.2/speech-to-video/input_image_0.png",
"prompt": "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard.",
"num_frames": 80,
"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"Buat SandBase API key dan atur di environment server Anda. Semua permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key di server. Jangan tampilkan di kode browser atau commit ke repository.
POST ke /v1/run dengan ID model ini dan inputnya. Contoh permintaan di atas mencakup pengiriman dan polling.
Gunakan run ID yang dikembalikan untuk polling sampai status completed, failed, atau timeout. Baca output hanya setelah completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Kirim URL file yang dapat diakses publik di field image, video, atau audio model. Format dan batas yang didukung ditampilkan di samping setiap input Playground.
Gunakan kontrol upload atau replace pada field gambar yang didukung di Playground. Field URL video menerima video driving yang di-host; ini tidak berarti dukungan upload video.
seedintegerRandom seed for reproducibility.
Minimum: 0
Maksimum: 2147483647
audiostringwajibInput audio URL.
imagestringwajibInput image URL (face / character).
promptstringwajibText prompt guiding the generation.
num_framesintegerFrames to generate (40โ120, multiple of 4) at 16 fps.
Default: 80
Minimum: 40
Maksimum: 120
resolutionstringOutput resolution.
Default: "720p"
Nilai yang mungkin: "480p", "580p", "720p"
negative_promptstringContent to avoid.
Default: ""
{
"model": "alibaba/wan/2.2/speech-to-video",
"audio": "https://static.sandbase.ai/examples/alibaba/wan/2.2/speech-to-video/input_audio_1.wav",
"image": "https://static.sandbase.ai/examples/alibaba/wan/2.2/speech-to-video/input_image_0.png",
"prompt": "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard.",
"num_frames": 80,
"resolution": "720p"
}Run yang selesai menampilkan hasilnya di output. Berikut adalah contoh tersimpan model ini, bukan generasi baru.
[
{
"poster": "https://static.sandbase.ai/examples/posters/e90941034859654e6a1d.jpg",
"source": "Alibaba Model Studio schema mirror",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/",
"url": "https://static.sandbase.ai/examples/1e330d15-cead-4a6f-95c7-573cdf0002b4/output/7c0ba794-a7be-4ec8-80ab-357cd06ad681.mp4"
}
]