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.
Modell testen
PNG, JPEG, WebP oder GIF · maximal 20 MiB
Was möchten Sie als Nächstes tun?
Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.
{
"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.
Jetzt loslegen
Senden Sie dieses Modell über die 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"Erstellen Sie einen SandBase API-Schlüssel und legen Sie ihn in Ihrer Serverumgebung fest. Alle Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie den Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis und committen Sie ihn nicht in ein Repository.
POST an /v1/run mit dieser Modell-ID und ihren Eingaben. Das obige Anfragebeispiel umfasst Übermittlung und Polling.
Verwenden Sie die zurückgegebene Run-ID zum Polling, bis der Status completed, failed oder timeout ist. Lesen Sie die Ausgabe erst nach completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Übergeben Sie eine öffentlich zugängliche Date-URL im Bild-, Video- oder Audiofeld des Modells. Unterstützte Formate und Limits werden neben jedem Playground-Eingabefeld angezeigt.
Verwenden Sie im Playground bei unterstützten Bildfeldern die Steuerung zum Hochladen oder Ersetzen. Video-URL-Felder akzeptieren ein gehostetes Fahrvideo; sie implizieren keine Unterstützung für Video-Uploads.
seedintegerRandom seed for reproducibility.
Minimum: 0
Maximum: 2147483647
audiostringerforderlichInput audio URL.
imagestringerforderlichInput image URL (face / character).
promptstringerforderlichText prompt guiding the generation.
num_framesintegerFrames to generate (40–120, multiple of 4) at 16 fps.
Standard: 80
Minimum: 40
Maximum: 120
resolutionstringOutput resolution.
Standard: "720p"
Mögliche Werte: "480p", "580p", "720p"
negative_promptstringContent to avoid.
Standard: ""
{
"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"
}Ein abgeschlossener Run stellt sein Ergebnis in der Ausgabe bereit. Das Folgende ist das gespeicherte Beispiel des Modells, keine neue Generierung.
[
{
"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"
}
]