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.
モデルを試す
PNG、JPEG、WebP、GIF · 最大 20 MiB
PNG、JPEG、WebP、GIF · 最大 20 MiB
次に何をしますか?
例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
{
"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).
開発を始める
このモデルを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"SandBaseのAPIキーを作成し、サーバー環境に設定してください。すべてのリクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
seedintegerRandom seed (0-2147483647) for reproducible results. Omit for a random seed.
audiostringThe URL of an audio file to guide video generation.
imagestring必須The URL of the starting image for video generation.
promptstring必須The text prompt to generate a video from.
デフォルト: "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.
デフォルト: 5
指定可能な値: 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.
デフォルト: "720p"
指定可能な値: "720p", "1080p"
aspect_ratiostringThe aspect ratio of the generated video.
指定可能な値: "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の結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
[
{
"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"
}
]