seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed.
alibaba/wan/2.6/reference-to-videoAlibaba Wan 2.6 reference-to-video model generating video guided by reference content.
试用该模型
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
下一步想做什么?
选择一个示例,将其输入和结果加载到 playground 中。
{
"duration": 5,
"prompt": "character1 waves at the camera in a park",
"resolution": "720p",
"videos": [
"https://static.sandbase.ai/examples/c72451c5-1f5c-4eda-a2ee-25f90d5edd48/input/066dc590-034d-4da8-a5d9-93f357a55807.mp4"
]
}Place characters from reference images or short reference videos into a new scene. Name each reference in the prompt and Wan 2.6 keeps their look while they act out the scene, including multi-character interactions and dialogue.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 50,000 characters. |
videos | video URL[] | — | Reference clips, Video 1, Video 2, … |
duration | 5 / 10 | 5 | Output length in seconds. |
aspect_ratio | 1:1 / 4:3 / 3:4 / 16:9 / 9:16 | 16:9 | Output frame shape. |
resolution | 720p / 1080p | 720p | Sets the per-second rate. |
seed | integer | random | Fix it to compare prompt changes. |
images | image URL[] | — | Reference images, Image 1, Image 2, … |
You pay for output seconds: $0.10 at 720p and $0.15 at 1080p, 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 |
Failed runs are not charged.
Other Wan 2.6 endpoints: alibaba/wan/2.6/text-to-video, alibaba/wan/2.6/image-to-video, alibaba/wan/2.6/flash/image-to-video, alibaba/wan/2.6/flash/reference-to-video, alibaba/wan/2.6/text-to-image, alibaba/wan/2.6/image-to-image, alibaba/wan/2.7/text-to-video (newer).
开始构建
通过 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.6/reference-to-video",
"prompt": "Video1 holds Image2 and plays a soothing country folk song on the chair from Image3, saying: 'The sunshine is so nice today.' Image1 holds a bouquet of sunflowers, walks past Video1, places the flowers on the table next to Video1, and says: 'That sounds lovely, could you sing it again?'",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
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.
imagesarrayReference images, referred to in the prompt as Image1, Image2, ... Combined with videos, up to 5 references in total.
promptstring必填The text prompt to generate a video from.
默认值:"Video1 holds Image2 and plays a soothing country folk song on the chair from Image3, saying: 'The sunshine is so nice today.' Image1 holds a bouquet of sunflowers, walks past Video1, places the flowers on the table next to Video1, and says: 'That sounds lovely, could you sing it again?'"
videosarrayThe URLs of reference videos to guide video generation.
durationintegerThe duration of the generated video in seconds. Valid values are 5 and 10.
默认值:5
可选值:5, 10
resolutionstringThe resolution of the video to generate.
默认值:"720p"
可选值:"720p", "1080p"
aspect_ratiostringThe aspect ratio of the generated video.
默认值:"16:9"
可选值:"1:1", "4:3", "3:4", "16:9", "9:16"
{
"model": "alibaba/wan/2.6/reference-to-video",
"prompt": "Video1 holds Image2 and plays a soothing country folk song on the chair from Image3, saying: 'The sunshine is so nice today.' Image1 holds a bouquet of sunflowers, walks past Video1, places the flowers on the table next to Video1, and says: 'That sounds lovely, could you sing it again?'",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}已完成的运行会在输出中展示结果。以下内容是该模型保存的示例,而不是新的生成结果。
[
{
"poster": "https://static.sandbase.ai/examples/posters/a6f0ed33ab1796ceb861.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/c72451c5-1f5c-4eda-a2ee-25f90d5edd48/output/72f28b5e-65a1-47be-8529-26c24716b306.mp4"
}
]