seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed.
ลองใช้โมเดล
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
ต้องการทำอะไรต่อ
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"prompt": "Change the video to an 8-bit pixel style",
"video": "https://static.sandbase.ai/examples/d2517981-e23d-4629-a811-791107b46f0d/input/776801b8-88cf-4cfe-8ae6-b3b3f695f1e3.mp4"
}{
"images": [
"https://static.sandbase.ai/examples/9d304d2f-bc79-4e10-895b-7f9feb28fe82/input/255e6684-4e13-4b95-9841-ae954e4713a4.webp"
],
"prompt": "Make the horse-headed character in the video wear the striped sweater from the image",
"video": "https://static.sandbase.ai/examples/9d304d2f-bc79-4e10-895b-7f9feb28fe82/input/6dfddb1c-4c34-48a6-a270-e605bc44cb6c.mp4"
}{
"prompt": "Remove the train from the video. Keep everything else the same.",
"video": "https://static.sandbase.ai/examples/cd7590b7-af00-4d8b-87d1-58170e9b07db/input/5adb4529-4fd8-4595-922d-4c4198496cc9.mp4"
}{
"prompt": "Change the background season to a snowy winter, with snow covering the trees. Keep the river the same.",
"video": "https://static.sandbase.ai/examples/f69f7e20-129d-4d5a-b109-f23772cb979b/input/b20d1ce4-7267-4dd3-ae9e-d09498d0d211.mp4"
}{
"prompt": "Keep the character's voice and tone. Change the left girl's line to: \"Mom, what color is this?\", and change the right girl's line to: \"It's green, baby\"",
"video": "https://static.sandbase.ai/examples/29baa5d7-a124-48b7-91f8-c617e222fd79/input/e4ee5497-9a40-477e-9d6f-f0680cf46210.mp4"
}{
"images": [
"https://static.sandbase.ai/examples/27df96ad-5550-452c-9d92-b0a530e5eb65/input/f88104ef-3e5f-4c9e-ab4b-bf8d6b35879f.png"
],
"prompt": "Reference the special effects of the video and apply them to the woman in the image, with the scene set on a street.",
"video": "https://static.sandbase.ai/examples/27df96ad-5550-452c-9d92-b0a530e5eb65/input/173d05e0-a5ab-485f-9a75-fe20bf0e5f13.mp4"
}Change an existing clip with a sentence: restyle it, swap an object or outfit, or rework the background. The edit is carried through every frame so motion and timing from the source are kept. Optional reference images guide the new look.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 50,000 characters. |
video | video URL, required | — | Source clip, Video 1 in the prompt. |
images | image URL[] | — | Optional reference images, Image 1, Image 2, … |
audio_setting | auto / origin | auto | auto regenerates audio to match the edit; origin keeps the source track. |
duration | 0 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 | 0 | 0 keeps the source length; 2–10 trims or sets the output length. |
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. With duration: 0 the output matches the source, so you pay for the source length; the quote before submission assumes 5 seconds and the final charge uses the measured length. Input video is not metered separately.
| Output | 720p | 1080p |
|---|---|---|
5s source, duration: 0 | $0.50 | $0.75 |
10s source, duration: 0 | $1.00 | $1.50 |
Any source, duration: 3 | $0.30 | $0.45 |
Failed runs are not charged.
duration before running the full clip.alibaba/wan/2.7/video-extend.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-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/video-edit",
"duration": 0,
"resolution": "720p",
"audio_setting": "auto"
}
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 key และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
seedintegerRandom seed (0-2147483647) for reproducible results. Omit for a random seed.
videostringจำเป็นThe URL of the input video to edit.
imagesarrayReference images to guide the video editing.
promptstringจำเป็นThe editing instruction describing what changes to make.
ค่าเริ่มต้น: ""
durationintegerOutput video duration in seconds. 0 means match input video duration. When set (2-10), truncates from the start.
ค่าเริ่มต้น: 0
ค่าที่เป็นไปได้: 0, 2, 3, 4, 5, 6, 7, 8, 9, 10
resolutionstringThe resolution of the output video.
ค่าเริ่มต้น: "720p"
ค่าที่เป็นไปได้: "720p", "1080p"
audio_settingstringAudio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve original audio from input video.
ค่าเริ่มต้น: "auto"
ค่าที่เป็นไปได้: "auto", "origin"
{
"model": "alibaba/wan/2.7/video-edit",
"duration": 0,
"resolution": "720p",
"audio_setting": "auto"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"poster": "https://static.sandbase.ai/examples/posters/4f56fc5e6f0961e6af9e.jpg",
"source": "Alibaba Cloud",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/wan-video-editing-guide",
"url": "https://static.sandbase.ai/examples/d2517981-e23d-4629-a811-791107b46f0d/output/19789c99-8591-4882-a1d4-25574df39dec.mp4"
}
]