seedinteger
Random seed for reproducibility. If None, a random seed is chosen.
vidu/q4/reference-to-videoVidu Q4 Preview by Shengshu builds a 3 to 16 second video at up to 4K from up to 12 reference images and 3 voice clips, keeping characters, products, and voices consistent across the clip.
Try the model
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 12
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.
{
"aspect_ratio": "16:9",
"prompt": "[@reference_image_1] waddles across the sunny sand of [@reference_image_2], stops at the shell, sniffs it curiously and flaps its small wings with a happy chirp as waves roll in.",
"reference_image_urls": [
"https://static.sandbase.ai/examples/ea55f5ce-2b72-4369-b2dd-7aae51f770e5/input/127f444c-b589-4225-9dd1-22597400ba65.png",
"https://static.sandbase.ai/examples/ea55f5ce-2b72-4369-b2dd-7aae51f770e5/input/5958a2b3-3eeb-479a-b5c2-65eeabee22fe.png"
]
}{
"aspect_ratio": "16:9",
"prompt": "Wide shot: [@reference_image_1] runs into the shallow water of [@reference_image_2], splashing playfully; the shot cuts to a low close-up as it shakes water off its wings and looks at the camera.",
"reference_image_urls": [
"https://static.sandbase.ai/examples/7eece669-a533-4f93-9ec4-87b5f3b1bc9d/input/4719d7e8-e9a5-4455-ad88-ab08b373e431.png",
"https://static.sandbase.ai/examples/7eece669-a533-4f93-9ec4-87b5f3b1bc9d/input/707fc0d7-dfd7-4a0f-9f74-ee94f420bf0e.png"
]
}Vidu Q4 Preview reference-to-video: build a 3–16 second clip at up to 4K from up to 12 reference images and 3 voice clips, keeping characters, products, and voices consistent.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 5,000 characters. Tag references as [@reference_image_1] and [reference_audio_1]. |
reference_image_urls | image URL[], required | — | 1–12 images of characters, products, objects, or locations. |
reference_audio_urls | audio URL[] | — | Up to 3 mp3 clips, 3–12 seconds each, for voice consistency. |
aspect_ratio | 16:9 / 9:16 / 4:3 / 3:4 / 1:1 | 16:9 | Output frame shape. |
audio | boolean | true | Generate dialogue and sound effects. Same price on or off. |
resolution | 540p / 720p / 1080p / 2K / 4K | 720p | Sets the per-second rate. |
duration | integer 3–16 | 5 | Output length in seconds. |
seed | integer | random | Fix it to compare prompt changes. |
You pay for output seconds: $0.045 at 540p, $0.095 at 720p, $0.12 at 1080p, $0.19 at 2K, $0.39 at 4K.
| Output | 540p | 720p | 1080p | 2K | 4K |
|---|---|---|---|---|---|
| 3s | $0.135 | $0.285 | $0.36 | $0.57 | $1.17 |
| 5s (default) | $0.225 | $0.475 | $0.60 | $0.95 | $1.95 |
| 8s | $0.36 | $0.76 | $0.96 | $1.52 | $3.12 |
| 16s | $0.72 | $1.52 | $1.92 | $3.04 | $6.24 |
Failed runs are not charged.
[@reference_image_2] holds the product.vidu/q4/image-to-video animates a single first frame. Vidu Q3 endpoints such as vidu/q3/reference-to-video/mix remain available.
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": "vidu/q4/reference-to-video",
"audio": true,
"prompt": "[@reference_image_1] walks along the beach at sunset holding [@reference_image_2], then turns to the camera and smiles.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png",
"https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png"
]
}
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 for reproducibility. If None, a random seed is chosen.
audiobooleanWhether to generate audio (dialogue and sound effects) with the video. When false, the output video is silent.
Default: true
promptstringrequiredText prompt for video generation, max 5000 characters. Refer to references by position: [@reference_image_1], [@reference_image_2], ... for images and [reference_audio_1], [reference_audio_2], ... for audio clips.
durationintegerDuration of the video in seconds (3-16)
Default: 5
Minimum: 3
Maximum: 16
resolutionstringOutput video resolution. Sets the per-second rate.
Default: "720p"
Possible values: "540p", "720p", "1080p", "2K", "4K"
aspect_ratiostringThe aspect ratio of the output video.
Default: "16:9"
Possible values: "16:9", "9:16", "4:3", "3:4", "1:1"
reference_audio_urlsarrayURLs of up to 3 mp3 reference audio clips (3-12 seconds each, max 50 MB) used to keep voices consistent.
reference_image_urlsarrayrequiredURLs of 1 to 12 reference images (png, jpeg, jpg, webp) used to keep characters, products, objects, or locations consistent.
{
"model": "vidu/q4/reference-to-video",
"audio": true,
"prompt": "[@reference_image_1] walks along the beach at sunset holding [@reference_image_2], then turns to the camera and smiles.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png",
"https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png"
]
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"url": "https://static.sandbase.ai/examples/ea55f5ce-2b72-4369-b2dd-7aae51f770e5/output/b65887af-add4-4aaa-a487-b0ed0c1fb9e3.mp4"
}
]