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.
Попробовать модель
PNG, JPEG, WebP или GIF · максимум 20 MiB
Что вы хотите сделать дальше?
Выберите пример, чтобы загрузить его входные данные и результат в 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.
Начните разработку
Отправьте эту модель через 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"Создайте ключ SandBase API и задайте его в окружении сервера. Все запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера и не коммитьте в репозиторий.
Отправьте POST на /v1/run с этим ID модели и её входными данными. Пример запроса выше включает отправку и опрос.
Используйте возвращённый ID запуска, чтобы опрашивать статус до завершения, ошибки или таймаута. Читайте вывод только после завершения.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Передайте публично доступный URL файла в поле image, video или audio модели. Поддерживаемые форматы и лимиты показаны рядом с каждым полем Playground.
Используйте управление загрузкой или заменой в поддерживаемых полях изображений в Playground. Поля URL видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
seedintegerRandom seed for reproducibility. If None, a random seed is chosen.
imagestringобязательноURL 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.
По умолчанию: ""
durationintegerDuration of the video in seconds (3-16)
По умолчанию: 5
Минимум: 3
Максимум: 16
resolutionstringOutput video resolution. Sets the per-second rate.
По умолчанию: "720p"
Возможные значения: "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"
}В завершённом запуске результат доступен в output. Ниже приведён сохранённый пример модели, а не новая генерация.
[
{
"url": "https://static.sandbase.ai/examples/da3da75f-2e08-46a9-95f1-398e0499bed9/output/d3ecd824-a438-46f3-ac76-3cac64dc8435.mp4"
}
]