seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed; the same seed may still produce slightly different results.
Minimum: 0
Maksimum: 2147483647
alibaba/wan/3.0/reference-to-videoWan 3.0 by Alibaba generates up to 30-second videos with native audio from reference images, videos, and audio, keeping subjects, motion, and voice consistent with the references.
Coba model ini
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10
Apa yang ingin Anda lakukan selanjutnya?
Pilih contoh untuk memuat input dan hasilnya ke playground.
{
"aspect_ratio": "9:16",
"duration": 15,
"images": [
"https://static.sandbase.ai/examples/825e2704-ea2e-446d-bae9-bfaabb6928c9/input/e6ff2dc2-df0d-49cc-870e-198b092f5883.png"
],
"prompt": "Using the lip gloss product in Image 1, generate a model swatch video, 15 seconds, vertical screen, highlighting the lip color effect"
}{
"audios": [
"https://static.sandbase.ai/examples/14ec396a-c777-43c4-acb7-91f7c8cb9d01/input/1f48b8fb-18d8-4431-9355-29adb4604126.mp3"
],
"duration": 15,
"images": [
"https://static.sandbase.ai/examples/14ec396a-c777-43c4-acb7-91f7c8cb9d01/input/9928ffd8-3ac6-4c82-95eb-f292b818701f.png"
],
"prompt": "Seamlessly replace the male character from Image 1 into Video 1's female role. The character sits by the window, holding a phone to the ear. [Voice and dialogue] Extract the voice characteristics from Audio 1, and have the character say the following lines: \"Really? That sounds great! When are you coming back? I miss you so much.\" [Lip-sync and expressions] The generated voice must precisely drive the character's lip movements with natural opening and closing. While speaking, include natural blinking, slight head nodding, and a sense of breathing. Facial micro-expressions must perfectly match the caring and nostalgic emotions in the dialogue. [Lighting and scene] The character's face must naturally receive mixed lighting from warm indoor light and cool neon light from outside the window. Raindrops continuously slide slowly down the window in the background, with slight steam rising from the coffee on the table. The character blends naturally with the scene edges, with no cutout artifacts. [Camera and quality] 15-second long take, camera pushes forward extremely slowly, extremely stable frame, cinematic lighting, 8K resolution, photorealistic quality.",
"videos": [
"https://static.sandbase.ai/examples/14ec396a-c777-43c4-acb7-91f7c8cb9d01/input/5b312925-b2ef-40b7-8456-8a70dfe0a374.mp4"
]
}Generate a new shot that reuses what you already have: faces and products from images, motion and framing from clips, voices and music from audio. The prompt decides how the references come together.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 5,000 characters. |
images | image URL[] (≤10) | — | Referenced as Image 1, Image 2, … |
videos | video URL[] (≤5) | — | MP4/MOV, 1–15s each, 15s total, ≤100MB. Referenced as Video 1, … |
audios | audio URL[] (≤5) | — | WAV/MP3, 1–15s each, 15s total, ≤15MB. Referenced as Audio 1, … |
duration | 2–30 or auto | 5 | auto lets the model pick the length. |
resolution | 480p / 720p / 1080p | 720p | Sets the per-second rate. |
aspect_ratio | adaptive / 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 | adaptive | adaptive follows the prompt and inputs. |
generate_audio | boolean | true | Native dialogue, music, and effects. Same price on or off. |
seed | integer 0–2147483647 | random | Fix it to compare prompt changes. |
prompt_extend | boolean | true | LLM rewrites the prompt before generating. Set false to keep it verbatim. |
Send at least one of images, videos, or audios; any combination works.
You pay per second of output plus, when you send reference videos, their total length (rounded up, counted up to 15s): $0.05 at 480p, $0.10 at 720p, $0.20 at 1080p. Input images and audio are not metered. If the reference video length cannot be read, 15s is assumed.
| Request | Billed | 480p | 720p | 1080p |
|---|---|---|---|---|
| 5s output (default) | 5s | $0.25 | $0.50 | $1.00 |
| 10s output | 10s | $0.50 | $1.00 | $2.00 |
| 30s output | 30s | $1.50 | $3.00 | $6.00 |
| 5s output + 8s reference video | 13s | $0.65 | $1.30 | $2.60 |
| 5s output + 15s reference videos | 20s | $1.00 | $2.00 | $4.00 |
With duration: "auto" the run is pre-authorized at 30 seconds, then settled on the length that was actually generated. Failed runs are not charged. Output files are copied to SandBase storage and the returned URL stays valid for 7 days; download anything you need to keep.
Image 1 is the cyclist; Video 1 supplies the camera movement. She rides through a rainy city at night in the same red jacket, with quiet traffic in the background.
Other Wan 3.0 endpoints: alibaba/wan/3.0/video (all modes in one schema), alibaba/wan/3.0/text-to-video, alibaba/wan/3.0/image-to-video, alibaba/wan/3.0/video-edit, alibaba/wan/3.0/video-extend.
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/3.0/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/bytedance/seedance/2.0/reference-to-video/input_image_safe_ocean_0.jpg"
],
"duration": 5,
"resolution": "720p",
"prompt_extend": true,
"generate_audio": true
}
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 (0-2147483647) for reproducible results. Omit for a random seed; the same seed may still produce slightly different results.
Minimum: 0
Maksimum: 2147483647
audiosarrayUp to 5 reference audio URLs (WAV or MP3; 1-15s each, 15s total, under 15MB each). Cannot be combined with `image` or `end_image`.
imagesarrayUp to 10 reference image URLs (JPEG, PNG, BMP, or WebP; up to 20MB each, 240-8000px per side). Refer to them in the prompt as Image 1, Image 2, and so on. Provide at least one of `images`, `videos`, or `audios`.
promptstringwajibText prompt directing how the reference media is used. Reference media can be addressed positionally, e.g. 'the subject in Image 1 walks past Video 1'.
videosarrayUp to 5 reference video URLs (MP4 or MOV; 1-15s each, 15s total, under 100MB each). Cannot be combined with `image` or `end_image`.
durationnilaiOutput duration in seconds (2-30), or `auto` to let the model pick a length from the prompt and inputs. `auto` is pre-authorized at 30 seconds and billed on the actual output length.
Default: 5
Nilai yang mungkin: "auto", 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
resolutionstringOutput video resolution tier.
Default: "720p"
Nilai yang mungkin: "480p", "720p", "1080p"
aspect_ratiostringOutput aspect ratio. Omit to let the model choose from the prompt and reference inputs.
Nilai yang mungkin: "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"
prompt_extendbooleanLet the model rewrite your prompt with an LLM before generating. Helps short prompts but adds latency. Set false to use the prompt exactly as written.
Default: true
generate_audiobooleanGenerate a synchronized audio track. Pricing is the same either way.
Default: true
{
"model": "alibaba/wan/3.0/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/bytedance/seedance/2.0/reference-to-video/input_image_safe_ocean_0.jpg"
],
"duration": 5,
"resolution": "720p",
"prompt_extend": true,
"generate_audio": true
}Run yang selesai menampilkan hasilnya di output. Berikut adalah contoh tersimpan model ini, bukan generasi baru.
[
{
"poster": "https://static.sandbase.ai/examples/posters/8520c01a7e49b3bc2c65.jpg",
"source": "Alibaba Cloud",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-guide",
"url": "https://static.sandbase.ai/examples/825e2704-ea2e-446d-bae9-bfaabb6928c9/output/157c65c0-77e9-4ceb-a031-3bed2d561d11.mp4"
}
]