seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed.
alibaba/wan/2.7/reference-to-videoAlibaba Wan 2.7 reference-to-video model generating video guided by reference content.
Try the model
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Customize your input with more control.
What would you like to do next?
Select an example to load its inputs and result into the playground.
{
"images": [
"https://static.sandbase.ai/examples/6ec7122b-e121-4332-aac6-9564b61c6067/input/b1c60c74-e701-44d8-8f6a-c50b4cb6ffa0.webp"
],
"prompt": "Reference image, 3D cartoon adventure movie style, chibi characters with detailed textures, smooth actions, and vibrant colors. Keep the characters and forest scene consistent. Do not add text. Atmosphere: Adventurous, lighthearted, mysterious, whimsical. Characters: Boy explorer: round hat, backpack, short cloak. Sidekick: a flying small robot with a round body and blue glowing eyes. Scene: Fantasy forest with giant tree roots, mushrooms, vines, a treasure cave entrance, and sunbeams. Storyboard: 1. Wide shot: Tall trees and interlaced light beams in a mysterious and bright fantasy forest. 2. Medium shot: The boy pushes aside vines to explore. 3. Medium shot: The small robot flies beside him, scanning ahead with a blue light. 4. Close-up: An old treasure map unfolds in the boy's hands. 5. Close-up: He shows an excited expression, his eyes lighting up. 6. Action shot: The two jump over tree roots and a stream, continuing deeper into the forest. 7. Medium shot: A moss-covered treasure chest is revealed behind the vines. 8. Close-up: A golden glow shines from the edge of the treasure chest. 9. Final shot: The boy and the small robot stand before the treasure chest, looking at each other in surprise, full of adventure."
}Cast people, products, or characters from reference images (and optional reference videos) into a new scene. The prompt directs what they do; Wan 2.7 keeps their appearance consistent and supports several referenced characters interacting in one shot.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 50,000 characters. |
images | image URL[], required | — | Reference images, referred to in the prompt as Image 1, Image 2, … |
videos | video URL[] | — | Optional reference clips, referred to as Video 1, Video 2, … |
duration | 2–15 | 5 | Output length in seconds. |
aspect_ratio | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 | — | Output frame shape. |
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. When you send reference videos, 5 seconds of input are added to the billed length.
| Output | 720p | 1080p |
|---|---|---|
| 5s, images only | $0.50 | $0.75 |
| 5s, with reference video | $1.00 | $1.50 |
| 10s, images only | $1.00 | $1.50 |
| 15s, images only | $1.50 | $2.25 |
Failed runs are not charged.
images changes what “Image 2” means.alibaba/wan/2.7/video-edit.Other Wan 2.7 endpoints: alibaba/wan/2.7/text-to-video, alibaba/wan/2.7/image-to-video, alibaba/wan/2.7/video-edit, alibaba/wan/2.7/video-extend, alibaba/wan/3.0/video (newer, up to 30s).
Start building
Submit this model through the 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/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_images_0.png"
],
"prompt": "A golden retriever puppy running through a field of wildflowers in slow motion, ears flapping, tongue out, soft backlight",
"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"Create a SandBase API key and set it in your server environment. All requests use Bearer authentication.
export SANDBASE_API_KEY="YOUR_API_KEY"Keep the key on your server. Do not expose it in browser code or commit it to a repository.
POST to /v1/run with this model ID and its inputs. The request example above includes submission and polling.
Use the returned run ID to poll until the status is completed, failed or timeout. Read output only after completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Pass a publicly accessible file URL in the model’s image, video or audio field. Supported formats and limits are shown beside each Playground input.
Use the upload or replace control on supported image fields in the Playground. Video URL fields accept a hosted driving video; they do not imply video-upload support.
seedintegerRandom seed (0-2147483647) for reproducible results. Omit for a random seed.
imagesarrayrequiredThe URLs of reference images to guide video generation. Provide at least one reference image or video.
promptstringrequiredThe text prompt to generate a video from.
Default: "A golden retriever puppy running through a field of wildflowers in slow motion, ears flapping, tongue out, soft backlight"
videosarrayThe URLs of reference videos to guide video generation.
durationintegerThe duration of the generated video in seconds.
Default: 5
Possible values: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
resolutionstringThe resolution of the video to generate.
Default: "720p"
Possible values: "720p", "1080p"
aspect_ratiostringThe aspect ratio of the generated video.
Possible values: "16:9", "9:16", "1:1", "4:3", "3:4"
{
"model": "alibaba/wan/2.7/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_images_0.png"
],
"prompt": "A golden retriever puppy running through a field of wildflowers in slow motion, ears flapping, tongue out, soft backlight",
"duration": 5,
"resolution": "720p"
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"poster": "https://static.sandbase.ai/examples/posters/06a833ab909502d05a32.jpg",
"source": "Alibaba Cloud",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/video-to-video-guide",
"url": "https://static.sandbase.ai/examples/6ec7122b-e121-4332-aac6-9564b61c6067/output/69588557-e71b-479f-9cd3-29ece3fc657d.mp4"
}
]