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.
Essayer le modèle
PNG, JPEG, WebP ou GIF · 20 MiB maximum
Que souhaitez-vous faire ensuite ?
Sélectionnez un exemple pour charger ses entrées et son résultat dans le 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.
Commencer à construire
Soumettez ce modèle via l'API Unified Run de SandBase.
# 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"Créez une clé API SandBase et définissez-la dans l'environnement de votre serveur. Toutes les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez la clé sur votre serveur. Ne l'exposez pas dans le code du navigateur et ne la committez pas dans un dépôt.
Faites un POST sur /v1/run avec cet ID de modèle et ses entrées. L'exemple de requête ci-dessus inclut la soumission et le polling.
Utilisez l'ID d'exécution renvoyé pour interroger jusqu'à ce que le statut soit completed, failed ou timeout. Ne lisez la sortie qu'une fois completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passez une URL de fichier accessible publiquement dans le champ image, video ou audio du modèle. Les formats pris en charge et les limites sont indiqués à côté de chaque entrée du Playground.
Utilisez le contrôle upload ou replace sur les champs image pris en charge dans le Playground. Les champs URL vidéo acceptent une vidéo de conduite hébergée ; cela n'implique pas la prise en charge de l'importation vidéo.
seedintegerRandom seed for reproducibility. If None, a random seed is chosen.
imagestringobligatoireURL 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.
Par défaut : ""
durationintegerDuration of the video in seconds (3-16)
Par défaut : 5
Minimum : 3
Maximum : 16
resolutionstringOutput video resolution. Sets the per-second rate.
Par défaut : "720p"
Valeurs possibles : "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"
}Une exécution terminée expose son résultat dans output. Ce qui suit est l'exemple enregistré du modèle, et non une nouvelle génération.
[
{
"url": "https://static.sandbase.ai/examples/da3da75f-2e08-46a9-95f1-398e0499bed9/output/d3ecd824-a438-46f3-ac76-3cac64dc8435.mp4"
}
]