seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed.
最小值:0
最大值:2147483647
alibaba/wan/2.7/video-extendAlibaba Wan 2.7 Video Extend continues an input clip from a text instruction, optionally ending on a chosen last frame, for a total length of up to 15 seconds.
試用這個模型
PNG、JPEG、WebP 或 GIF · 最多 20 MiB
接下來您想做什麼?
選擇一個範例,將其輸入與結果載入 playground。
{
"prompt": "The baker brings over the glazed bread, sets the brush aside, and the camera follows him to the oven at the back to bake it. The baker closes the oven door, stands beside it watching the bread, smells the aroma, and says, \"so good\".",
"video": "https://static.sandbase.ai/examples/e1e1d989-70de-4368-b8d6-3a0919be90be/input/3627aff0-af0f-4067-813d-02de847a28b4.mp4"
}{
"duration": 10,
"end_image": "https://static.sandbase.ai/examples/6f0aa006-092a-4928-81a6-8dcc540a5f94/input/e647b006-fde3-461d-a97d-a712a7795369.webp",
"prompt": "The man looks down at the wooden box on the ground. He bends over, carefully opens the lid, and stares at the contents. His lips tremble and part slightly, his brow furrows, and his eyes widen with a horrified expression.",
"video": "https://static.sandbase.ai/examples/6f0aa006-092a-4928-81a6-8dcc540a5f94/input/7e501c4f-2478-49c6-8697-64d8c44400a7.mp4"
}Continue an existing clip. Wan 2.7 picks up from the last frame of video and generates new footage that follows your prompt; add end_image to say where the continuation should land.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 5,000 characters. |
video | video URL, required | — | Clip to continue. |
end_image | image URL | — | Optional frame the new footage should end on. |
duration | 2–15 | 5 | Length of the new footage in seconds. |
resolution | 720p / 1080p | 720p | Sets the per-second rate. |
seed | integer 0–2147483647 | 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. Only the new footage is billed.
| New footage | 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.
end_image when the shot must finish on a specific composition.Other Wan 2.7 endpoints: alibaba/wan/2.7/text-to-video, alibaba/wan/2.7/image-to-video, alibaba/wan/2.7/reference-to-video, alibaba/wan/2.7/video-edit, 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/video-extend",
"video": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/hfugmr/wan-r2v-role1.mp4",
"prompt": "A girl takes a selfie in the mirror, then picks up her backpack and walks out of the room.",
"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。上方的請求範例包含提交與輪詢。
使用回傳的執行 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 中支援的圖片欄位上使用上傳或取代控制項。影片 URL 欄位可接受託管的 driving video;它們不代表支援影片上傳。
seedintegerRandom seed (0-2147483647) for reproducible results. Omit for a random seed.
最小值:0
最大值:2147483647
videostring必填URL of the source clip to continue (MP4 or MOV, 2-10 seconds, 240-4096px per side, up to 100MB).
promptstring必填What happens after the source clip ends: action, camera movement, scene progression, and sound. Up to 5,000 characters.
durationintegerTotal length of the output in seconds, including the source clip (2-15). For a 3-second source and duration 10, the model adds 7 seconds. Must be longer than the source clip.
預設:5
可能值:2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
end_imagestringOptional last frame the continuation should end on (JPEG, PNG, BMP, or WebP; 240-8000px per side, up to 20MB).
resolutionstringThe resolution of the video to generate.
預設:"720p"
可能值:"720p", "1080p"
{
"model": "alibaba/wan/2.7/video-extend",
"video": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20260129/hfugmr/wan-r2v-role1.mp4",
"prompt": "A girl takes a selfie in the mirror, then picks up her backpack and walks out of the room.",
"duration": 5,
"resolution": "720p"
}已完成的執行會在輸出中顯示結果。以下為模型已儲存的範例,並非新的生成結果。
[
{
"poster": "https://static.sandbase.ai/examples/posters/7dd835e57bac8c025b9d.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/e1e1d989-70de-4368-b8d6-3a0919be90be/output/99a0b1f2-d458-425e-8666-39b03bf9cc58.mp4"
}
]