seedinteger
Random seed for reproducibility. If None, a random seed is chosen.
vidu/q4/image-to-videoVidu Q4 Preview by Shengshu animates a first-frame image into a 3 to 16 second video at up to 4K. Prompts can direct motion, camera cuts, and spoken dialogue, with native speech and sound effects.
Prova il modello
PNG, JPEG, WebP o GIF · massimo 20 MiB
Cosa vuoi fare dopo?
Seleziona un esempio per caricare i suoi input e il risultato nel playground.
{
"image": "https://static.sandbase.ai/examples/da3da75f-2e08-46a9-95f1-398e0499bed9/input/99da89c9-98be-4974-8eed-5e8b4965db43.webp",
"prompt": "The woman turns toward the camera and smiles, then the shot cuts to a close-up as she says: \"Let's go.\""
}{
"image": "https://static.sandbase.ai/examples/ccdbd99a-6ef9-413d-8bac-ea4670227979/input/4e82b9ae-5614-4a88-84a1-263ed973d933.png",
"prompt": "The astronaut raises a hand and waves as the nebula swirls behind him; the camera slowly pushes in and then rises above his helmet. Low cosmic hum and a soft radio crackle."
}Vidu Q4 Preview image-to-video: animate a first frame into a 3–16 second clip at up to 4K, with native audio such as speech and sound effects directed by the prompt.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string | empty | Up to 5,000 characters. Describe motion, camera cuts, and dialogue. |
image | image URL, required | — | First frame. PNG, JPEG, or WebP up to 50 MB. |
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.
vidu/q4/reference-to-video keeps characters, products, and voices consistent from reference images and audio. Vidu Q3 endpoints such as vidu/q3/image-to-video remain available.
Inizia a costruire
Invia questo modello tramite la 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/image-to-video",
"image": "https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp",
"prompt": "The woman turns toward the camera and smiles, then the shot cuts to a close-up as she says: \"Let's go.\"",
"duration": 5,
"resolution": "720p"
}
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"Crea una SandBase API key e impostala nell'ambiente del server. Tutte le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la key sul server. Non esporla nel codice del browser né committarla in un repository.
Esegui POST su /v1/run con questo ID modello e i relativi input. L'esempio di richiesta sopra include invio e polling.
Usa il run ID restituito per fare polling finché lo stato non è completed, failed o timeout. Leggi l'output solo dopo completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passa un URL di file accessibile pubblicamente nel campo image, video o audio del modello. I formati supportati e i limiti sono mostrati accanto a ciascun input del Playground.
Usa il controllo upload o replace sui campi immagine supportati nel Playground. I campi URL video accettano un video di driving ospitato; non implicano il supporto al caricamento video.
seedintegerRandom seed for reproducibility. If None, a random seed is chosen.
imagestringobbligatorioURL or base64 data URI of the image to use as the first frame. Supports png, jpeg, jpg and webp up to 50 MB.
promptstringText prompt for video generation, max 5000 characters. Can direct motion, camera cuts, and spoken dialogue.
Predefinito: ""
durationintegerDuration of the video in seconds (3-16)
Predefinito: 5
Minimo: 3
Massimo: 16
resolutionstringOutput video resolution. Sets the per-second rate.
Predefinito: "720p"
Valori possibili: "540p", "720p", "1080p", "2K", "4K"
{
"model": "vidu/q4/image-to-video",
"image": "https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp",
"prompt": "The woman turns toward the camera and smiles, then the shot cuts to a close-up as she says: \"Let's go.\"",
"duration": 5,
"resolution": "720p"
}Un run completato espone il risultato in output. Quanto segue è l'esempio salvato del modello, non una nuova generazione.
[
{
"url": "https://static.sandbase.ai/examples/da3da75f-2e08-46a9-95f1-398e0499bed9/output/d3ecd824-a438-46f3-ac76-3cac64dc8435.mp4"
}
]