seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed.
alibaba/wan/2.7/image-to-videoAlibaba Wan 2.7 image-to-video model transforming still images into video with native audio generation.
Coba model ini
PNG, JPEG, WebP, atau GIF Β· maksimum 20 MiB
PNG, JPEG, WebP, atau GIF Β· maksimum 20 MiB
Apa yang ingin Anda lakukan selanjutnya?
Pilih contoh untuk memuat input dan hasilnya ke playground.
{
"end_image": "https://static.sandbase.ai/examples/4c735020-6541-4ca8-8445-37403e34c9f2/input/3b9dd46d-a90b-4041-942f-25713579cec6.webp",
"image": "https://static.sandbase.ai/examples/4c735020-6541-4ca8-8445-37403e34c9f2/input/4d31c6ec-bcfc-46ba-923a-99fbe366820c.webp",
"prompt": "In the early morning as the sun rises, a small pumpkin with dewdrops sits in a pumpkin patch. Suddenly, the pumpkin cracks open with a \"CRACK\". A golden light emanates from the fissure as the pumpkin splits apart, releasing a puff of white mist. A small rabbit appears in the center of the opened pumpkin."
}Animate your own picture. image becomes the first frame; add end_image and Wan 2.7 interpolates the motion between the two. Clips run 2β15 seconds, optionally driven by an audio track.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | β | Up to 50,000 characters. |
image | image URL, required | β | First frame. JPEG, PNG, or WebP URL. |
end_image | image URL | β | Optional last frame. |
audio | audio URL | β | Optional WAV/MP3 URL that drives speech or rhythm. |
duration | 2β15 | 5 | Output length in seconds. |
aspect_ratio | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 | β | Omit to follow the input image. |
resolution | 720p / 1080p | 720p | Sets the per-second rate. |
seed | integer | random | Fix it to compare prompt changes. |
You pay for output seconds: $0.10 at 720p and $0.15 at 1080p, the same as Alibaba's list price. Input images and audio are not metered.
| Output | 720p | 1080p |
|---|---|---|
| 2s | $0.20 | $0.30 |
| 5s (default) | $0.50 | $0.75 |
| 10s | $1.00 | $1.50 |
| 15s | $1.50 | $2.25 |
Failed runs are not charged.
aspect_ratio unset to keep the image's own proportions.alibaba/wan/2.7/reference-to-video.Other Wan 2.7 endpoints: alibaba/wan/2.7/text-to-video, alibaba/wan/2.7/reference-to-video, alibaba/wan/2.7/video-edit, alibaba/wan/2.7/video-extend, alibaba/wan/3.0/video (newer, up to 30s).
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.7/image-to-video",
"image": "https://static.sandbase.ai/samples/image-to-video/i2v-urban-source.png",
"prompt": "The bus starts moving slowly down the street, rain begins to fall, pedestrians open umbrellas, camera follows the bus",
"duration": 5,
"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 (0-2147483647) for reproducible results. Omit for a random seed.
audiostringThe URL of an audio file to guide video generation.
imagestringwajibThe URL of the starting image for video generation.
promptstringwajibThe text prompt to generate a video from.
Default: "The bus starts moving slowly down the street, rain begins to fall, pedestrians open umbrellas, camera follows the bus"
durationintegerThe duration of the generated video in seconds.
Default: 5
Nilai yang mungkin: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
end_imagestringThe URL of the ending image for video generation.
resolutionstringThe resolution of the video to generate.
Default: "720p"
Nilai yang mungkin: "720p", "1080p"
aspect_ratiostringThe aspect ratio of the generated video.
Nilai yang mungkin: "16:9", "9:16", "1:1", "4:3", "3:4"
{
"model": "alibaba/wan/2.7/image-to-video",
"image": "https://static.sandbase.ai/samples/image-to-video/i2v-urban-source.png",
"prompt": "The bus starts moving slowly down the street, rain begins to fall, pedestrians open umbrellas, camera follows the bus",
"duration": 5,
"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/332ae9e8901f9f08689f.jpg",
"source": "Alibaba Cloud",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/wan-image-to-video-guide",
"url": "https://static.sandbase.ai/examples/4c735020-6541-4ca8-8445-37403e34c9f2/output/f0e3dd70-3bdf-4802-abde-8a386d6b7444.mp4"
}
]