seedinteger
Random seed for reproducibility. If None, a random seed is chosen.
alibaba/wan/2.6/flash/reference-to-videoAlibaba Wan 2.6 Flash reference-to-video model that places characters from reference images or videos into a new scene, with optional generated audio and multi-shot control.
Thử model
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"prompt": "Dance battle between Character1 and Character2."
}The fast, lower-cost Wan 2.6 reference tier. Cast characters from reference images or videos into a new scene for quick iterations; audio generation and multi-shot cuts are on by default.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text instruction. |
images | image URL[] | — | Reference images, Image 1, Image 2, … |
videos | video URL[] | — | Reference clips, Video 1, Video 2, … |
resolution | 720p / 1080p | 720p | Sets the per-second rate. |
duration | 5 / 10 | 5 | Output length in seconds. |
multi_shots | boolean | true | Let the model cut between several shots. |
aspect_ratio | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 | 16:9 | Output frame shape. |
seed | integer | random | Fix it to compare prompt changes. |
generate_audio | boolean | true | Generate a synchronized audio track; turning it off halves the rate. |
With audio you pay $0.10 per output second at 720p and $0.15 at 1080p; silent output costs half. When you send reference videos, 5 seconds of input are added to the billed length.
| Output | 720p | 1080p |
|---|---|---|
| 5s with audio | $0.50 | $0.75 |
| 5s silent | $0.25 | $0.375 |
| 5s with audio + reference video | $1.00 | $1.50 |
| 10s with audio | $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/reference-to-video, alibaba/wan/2.6/flash/image-to-video, alibaba/wan/2.6/text-to-image, alibaba/wan/2.6/image-to-image, alibaba/wan/2.7/text-to-video (newer).
Bắt đầu xây dựng
Gửi model này qua 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/flash/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_images_0.png"
],
"prompt": "Dance battle between Character1 and Character2.",
"videos": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_videos_1.mp4"
],
"duration": 5,
"resolution": "720p",
"multi_shots": true,
"aspect_ratio": "16:9",
"generate_audio": true
}
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"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
seedintegerRandom seed for reproducibility. If None, a random seed is chosen.
imagesarrayReference images for subject consistency (0-5 images). Combined with video_urls, total references cannot exceed 5. Formats: JPEG, JPG, PNG (no alpha), BMP, WEBP. Resolution: 240-5000px. Max 10MB each. Reference order: image_urls continue numbering after video_urls.
promptstringbắt buộcUse Character1, Character2, etc. to reference subjects from your reference files. Works for people, animals, or objects. For multi-shot prompts: '[0-3s] Shot 1. [3-6s] Shot 2.' Max 1500 characters. Reference order: video_urls first, then image_urls.
videosarrayReference videos for subject consistency (0-3 videos). Videos' FPS must be at least 16 FPS. Combined with image_urls, total references cannot exceed 5. Reference order: video_urls are numbered first (Character1, Character2...), then image_urls continue the sequence.
durationintegerDuration of the generated video in seconds. R2V Flash supports only 5 or 10 seconds.
Mặc định: 5
Giá trị có thể dùng: 5, 10
resolutionstringVideo resolution tier. R2V Flash only supports 720p and 1080p.
Mặc định: "720p"
Giá trị có thể dùng: "720p", "1080p"
multi_shotsbooleanWhen true (default), enables intelligent multi-shot segmentation for coherent narrative videos with multiple shots. When false, generates single continuous shot. Only active when enable_prompt_expansion is True.
Mặc định: true
aspect_ratiostringThe aspect ratio of the generated image.
Mặc định: "16:9"
Giá trị có thể dùng: "16:9", "9:16", "1:1", "4:3", "3:4"
generate_audiobooleanWhether to generate a video with audio. Set to false for silent video generation. Silent videos are faster and cost half of the audio version price.
Mặc định: true
{
"model": "alibaba/wan/2.6/flash/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_images_0.png"
],
"prompt": "Dance battle between Character1 and Character2.",
"videos": [
"https://static.sandbase.ai/examples/alibaba/wan/2.6/reference-to-video/flash/input_videos_1.mp4"
],
"duration": 5,
"resolution": "720p",
"multi_shots": true,
"aspect_ratio": "16:9",
"generate_audio": true
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
[
{
"poster": "https://static.sandbase.ai/examples/posters/162c99e9ecd6e4569806.jpg",
"source": "Alibaba Model Studio schema mirror",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/",
"url": "https://static.sandbase.ai/examples/06adda09-8e45-4ccd-b799-23b878e72dad/output/e57df3be-b22e-4367-a2a5-e88bc35334bb.mp4"
}
]