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.
Wypróbuj model
PNG, JPEG, WebP lub GIF · maksymalnie 20 MiB
Co chcesz zrobić dalej?
Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
{
"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.
Zacznij tworzyć
Prześlij ten model przez 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"Utwórz klucz API SandBase i ustaw go w środowisku serwera. Wszystkie żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym ani nie commituj do repozytorium.
Wyślij POST do /v1/run z tym identyfikatorem modelu i jego danymi wejściowymi. Powyższy przykład żądania obejmuje wysyłanie i odpytywanie statusu.
Użyj zwróconego ID uruchomienia, aby odpytywać status do momentu completion, failed lub timeout. Odczytaj wynik dopiero po completion.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Przekaż publicznie dostępny URL pliku w polu image, video lub audio modelu. Obsługiwane formaty i limity są pokazane obok każdego pola wejściowego w Playground.
Użyj kontrolki upload lub replace w obsługiwanych polach image w Playground. Pola URL wideo akceptują hostowany film źródłowy; nie oznacza to obsługi przesyłania wideo.
seedintegerRandom seed for reproducibility. If None, a random seed is chosen.
imagestringwymaganeURL 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.
Domyślnie: ""
durationintegerDuration of the video in seconds (3-16)
Domyślnie: 5
Minimum: 3
Maksimum: 16
resolutionstringOutput video resolution. Sets the per-second rate.
Domyślnie: "720p"
Możliwe wartości: "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"
}Zakończone uruchomienie udostępnia swój wynik w output. Poniżej znajduje się zapisany przykład modelu, a nie nowa generacja.
[
{
"url": "https://static.sandbase.ai/examples/da3da75f-2e08-46a9-95f1-398e0499bed9/output/d3ecd824-a438-46f3-ac76-3cac64dc8435.mp4"
}
]