imagestringобязательно
URL of the input image for video generation.
xai/grok-imagine-video/1.5/lite/image-to-videoGrok Imagine Video 1.5 Lite, the low-cost tier of xAI's video model, animates an image into a 1-15 second video with native audio.
Попробовать модель
PNG, JPEG, WebP или GIF · максимум 20 MiB
Что вы хотите сделать дальше?
Выберите пример, чтобы загрузить его входные данные и результат в playground.
{
"duration": 1,
"image": "https://static.sandbase.ai/examples/5d48e76d-5a0c-452b-8181-aa4ba0072b12/input/9ef1f22e-26ce-4d56-8500-03a900ca4b9c.png",
"prompt": "the camera slowly zooms in",
"resolution": "480p"
}Grok Imagine Video 1.5 Lite image-to-video: low-cost animation of a picture into a 1–15 second clip.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 4,096 characters. |
image | image URL, required | — | First frame. JPEG, PNG, or WebP URL. |
resolution | 480p / 720p / 1080p | 720p | Sets the per-second rate. |
duration | integer 1–15 | 6 | Output length in seconds. |
Per output second: $0.02 at 480p, $0.03 at 720p, $0.14 at 1080p, plus $0.01 per request.
| Output | 480p | 720p | 1080p |
|---|---|---|---|
| 6s (default) | $0.13 | $0.19 | $0.85 |
| 10s | $0.21 | $0.31 | $1.41 |
| 15s | $0.31 | $0.46 | $2.11 |
Failed runs are not charged.
Other Grok Imagine Video 1.5 endpoints: xai/grok-imagine-video/1.5/text-to-video, xai/grok-imagine-video/1.5/image-to-video, xai/grok-imagine-video/1.5/reference-to-video, xai/grok-imagine-video/1.5/lite/text-to-video, xai/grok-imagine-video/text-to-video (previous version).
Начните разработку
Отправьте эту модель через 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": "xai/grok-imagine-video/1.5/lite/image-to-video",
"prompt": "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants pulsing with light, ancient stone ruins overgrown with glowing vines, over-the-shoulder camera, dark fantasy aesthetic, volumetric fog and Lumen lighting",
"duration": 6,
"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 видео принимают размещённое видео для вождения; это не означает поддержку загрузки видео.
imagestringобязательноURL of the input image for video generation.
promptstringобязательноText description of desired changes or motion in the video.
durationintegerVideo duration in seconds.
По умолчанию: 6
Минимум: 1
Максимум: 15
resolutionstringResolution of the output video.
По умолчанию: "720p"
Возможные значения: "480p", "720p", "1080p"
{
"model": "xai/grok-imagine-video/1.5/lite/image-to-video",
"prompt": "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants pulsing with light, ancient stone ruins overgrown with glowing vines, over-the-shoulder camera, dark fantasy aesthetic, volumetric fog and Lumen lighting",
"duration": 6,
"resolution": "720p"
}В завершённом запуске результат доступен в output. Ниже приведён сохранённый пример модели, а не новая генерация.
[
{
"poster": "https://static.sandbase.ai/examples/posters/a363922454ea6dd6c209.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/5d48e76d-5a0c-452b-8181-aa4ba0072b12/output/d7fbc476-d710-40e2-9b21-c867fb08553b.mp4"
}
]