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.
試用這個模型
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
接下來您想做什麼?
選擇一個範例,將其輸入與結果載入 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).
開始建置
透過 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"建立 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 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.
promptstring必填Use 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.
預設:5
可能值:5, 10
resolutionstringVideo resolution tier. R2V Flash only supports 720p and 1080p.
預設:"720p"
可能值:"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.
預設:true
aspect_ratiostringThe aspect ratio of the generated image.
預設:"16:9"
可能值:"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.
預設: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
}已完成的執行會在輸出中顯示結果。以下為模型已儲存的範例,並非新的生成結果。
[
{
"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"
}
]