seedinteger
Random seed (0-2147483647) for reproducible results. Omit for a random seed; the same seed may still produce slightly different results.
最小值:0
最大值:2147483647
alibaba/wan/3.0/reference-to-videoWan 3.0 by Alibaba generates up to 30-second videos with native audio from reference images, videos, and audio, keeping subjects, motion, and voice consistent with the references.
試用這個模型
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10
接下來您想做什麼?
選擇一個範例,將其輸入與結果載入 playground。
{
"aspect_ratio": "9:16",
"duration": 15,
"images": [
"https://static.sandbase.ai/examples/825e2704-ea2e-446d-bae9-bfaabb6928c9/input/e6ff2dc2-df0d-49cc-870e-198b092f5883.png"
],
"prompt": "Using the lip gloss product in Image 1, generate a model swatch video, 15 seconds, vertical screen, highlighting the lip color effect"
}{
"audios": [
"https://static.sandbase.ai/examples/14ec396a-c777-43c4-acb7-91f7c8cb9d01/input/1f48b8fb-18d8-4431-9355-29adb4604126.mp3"
],
"duration": 15,
"images": [
"https://static.sandbase.ai/examples/14ec396a-c777-43c4-acb7-91f7c8cb9d01/input/9928ffd8-3ac6-4c82-95eb-f292b818701f.png"
],
"prompt": "Seamlessly replace the male character from Image 1 into Video 1's female role. The character sits by the window, holding a phone to the ear. [Voice and dialogue] Extract the voice characteristics from Audio 1, and have the character say the following lines: \"Really? That sounds great! When are you coming back? I miss you so much.\" [Lip-sync and expressions] The generated voice must precisely drive the character's lip movements with natural opening and closing. While speaking, include natural blinking, slight head nodding, and a sense of breathing. Facial micro-expressions must perfectly match the caring and nostalgic emotions in the dialogue. [Lighting and scene] The character's face must naturally receive mixed lighting from warm indoor light and cool neon light from outside the window. Raindrops continuously slide slowly down the window in the background, with slight steam rising from the coffee on the table. The character blends naturally with the scene edges, with no cutout artifacts. [Camera and quality] 15-second long take, camera pushes forward extremely slowly, extremely stable frame, cinematic lighting, 8K resolution, photorealistic quality.",
"videos": [
"https://static.sandbase.ai/examples/14ec396a-c777-43c4-acb7-91f7c8cb9d01/input/5b312925-b2ef-40b7-8456-8a70dfe0a374.mp4"
]
}Generate a new shot that reuses what you already have: faces and products from images, motion and framing from clips, voices and music from audio. The prompt decides how the references come together.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 5,000 characters. |
images | image URL[] (≤10) | — | Referenced as Image 1, Image 2, … |
videos | video URL[] (≤5) | — | MP4/MOV, 1–15s each, 15s total, ≤100MB. Referenced as Video 1, … |
audios | audio URL[] (≤5) | — | WAV/MP3, 1–15s each, 15s total, ≤15MB. Referenced as Audio 1, … |
duration | 2–30 or auto | 5 | auto lets the model pick the length. |
resolution | 480p / 720p / 1080p | 720p | Sets the per-second rate. |
aspect_ratio | adaptive / 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 | adaptive | adaptive follows the prompt and inputs. |
generate_audio | boolean | true | Native dialogue, music, and effects. Same price on or off. |
seed | integer 0–2147483647 | random | Fix it to compare prompt changes. |
prompt_extend | boolean | true | LLM rewrites the prompt before generating. Set false to keep it verbatim. |
Send at least one of images, videos, or audios; any combination works.
You pay per second of output plus, when you send reference videos, their total length (rounded up, counted up to 15s): $0.05 at 480p, $0.10 at 720p, $0.20 at 1080p. Input images and audio are not metered. If the reference video length cannot be read, 15s is assumed.
| Request | Billed | 480p | 720p | 1080p |
|---|---|---|---|---|
| 5s output (default) | 5s | $0.25 | $0.50 | $1.00 |
| 10s output | 10s | $0.50 | $1.00 | $2.00 |
| 30s output | 30s | $1.50 | $3.00 | $6.00 |
| 5s output + 8s reference video | 13s | $0.65 | $1.30 | $2.60 |
| 5s output + 15s reference videos | 20s | $1.00 | $2.00 | $4.00 |
With duration: "auto" the run is pre-authorized at 30 seconds, then settled on the length that was actually generated. Failed runs are not charged. Output files are copied to SandBase storage and the returned URL stays valid for 7 days; download anything you need to keep.
Image 1 is the cyclist; Video 1 supplies the camera movement. She rides through a rainy city at night in the same red jacket, with quiet traffic in the background.
Other Wan 3.0 endpoints: alibaba/wan/3.0/video (all modes in one schema), alibaba/wan/3.0/text-to-video, alibaba/wan/3.0/image-to-video, alibaba/wan/3.0/video-edit, alibaba/wan/3.0/video-extend.
開始建置
透過 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/3.0/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/bytedance/seedance/2.0/reference-to-video/input_image_safe_ocean_0.jpg"
],
"duration": 5,
"resolution": "720p",
"prompt_extend": true,
"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 (0-2147483647) for reproducible results. Omit for a random seed; the same seed may still produce slightly different results.
最小值:0
最大值:2147483647
audiosarrayUp to 5 reference audio URLs (WAV or MP3; 1-15s each, 15s total, under 15MB each). Cannot be combined with `image` or `end_image`.
imagesarrayUp to 10 reference image URLs (JPEG, PNG, BMP, or WebP; up to 20MB each, 240-8000px per side). Refer to them in the prompt as Image 1, Image 2, and so on. Provide at least one of `images`, `videos`, or `audios`.
promptstring必填Text prompt directing how the reference media is used. Reference media can be addressed positionally, e.g. 'the subject in Image 1 walks past Video 1'.
videosarrayUp to 5 reference video URLs (MP4 or MOV; 1-15s each, 15s total, under 100MB each). Cannot be combined with `image` or `end_image`.
duration值Output duration in seconds (2-30), or `auto` to let the model pick a length from the prompt and inputs. `auto` is pre-authorized at 30 seconds and billed on the actual output length.
預設:5
可能值:"auto", 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
resolutionstringOutput video resolution tier.
預設:"720p"
可能值:"480p", "720p", "1080p"
aspect_ratiostringOutput aspect ratio. Omit to let the model choose from the prompt and reference inputs.
可能值:"21:9", "16:9", "4:3", "1:1", "3:4", "9:16"
prompt_extendbooleanLet the model rewrite your prompt with an LLM before generating. Helps short prompts but adds latency. Set false to use the prompt exactly as written.
預設:true
generate_audiobooleanGenerate a synchronized audio track. Pricing is the same either way.
預設:true
{
"model": "alibaba/wan/3.0/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/bytedance/seedance/2.0/reference-to-video/input_image_safe_ocean_0.jpg"
],
"duration": 5,
"resolution": "720p",
"prompt_extend": true,
"generate_audio": true
}已完成的執行會在輸出中顯示結果。以下為模型已儲存的範例,並非新的生成結果。
[
{
"poster": "https://static.sandbase.ai/examples/posters/8520c01a7e49b3bc2c65.jpg",
"source": "Alibaba Cloud",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-guide",
"url": "https://static.sandbase.ai/examples/825e2704-ea2e-446d-bae9-bfaabb6928c9/output/157c65c0-77e9-4ceb-a031-3bed2d561d11.mp4"
}
]