seedinteger
Random seed for reproducibility.
Minimum: 0
Maximum: 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.
Try the model
PNG, JPEG, WebP, or GIF · 20 MiB maximum
Customize your input with more control.
What would you like to do next?
Select an example to load its inputs and result into the 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.
Start building
Submit this model through the 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"Create a SandBase API key and set it in your server environment. All requests use Bearer authentication.
export SANDBASE_API_KEY="YOUR_API_KEY"Keep the key on your server. Do not expose it in browser code or commit it to a repository.
POST to /v1/run with this model ID and its inputs. The request example above includes submission and polling.
Use the returned run ID to poll until the status is completed, failed or timeout. Read output only after completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Pass a publicly accessible file URL in the model’s image, video or audio field. Supported formats and limits are shown beside each Playground input.
Use the upload or replace control on supported image fields in the Playground. Video URL fields accept a hosted driving video; they do not imply video-upload support.
seedintegerRandom seed for reproducibility.
Minimum: 0
Maximum: 2147483647
audiostringrequiredInput audio URL.
imagestringrequiredInput image URL (face / character).
promptstringrequiredText prompt guiding the generation.
num_framesintegerFrames to generate (40–120, multiple of 4) at 16 fps.
Default: 80
Minimum: 40
Maximum: 120
resolutionstringOutput resolution.
Default: "720p"
Possible values: "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"
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"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"
}
]