imagesarrayzorunlu
One or more reference image URLs to guide the video generation as style and content references. Reference in prompt as <IMAGE_0>, <IMAGE_1>, etc. Maximum 7 images.
xai/grok-imagine-video/1.5/reference-to-videoGrok Imagine Video 1.5 is xAI's image-to-video AI model. Bring static images to life with fluid animation, consistent character motion, and professional-grade video output.
Modeli deneyin
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Sırada ne yapmak istersiniz?
Bir örnek seçerek girdilerini ve sonucunu playground'a yükleyin.
{
"duration": 1,
"images": [
"https://static.sandbase.ai/examples/182071c8-4a68-49d6-8ddb-2e1ba5af7d4d/input/2e71e37f-fbf8-44ba-a7ad-c1a366f777bd.png"
],
"prompt": "the subject walks forward",
"resolution": "480p"
}Grok Imagine Video 1.5 reference-to-video: reference images keep characters and objects consistent in a 1–15 second clip.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 4,096 characters. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output frame shape. |
resolution | 480p / 720p | 720p | Sets the per-second rate. |
duration | integer 1–15 | 8 | Output length in seconds. |
images | image URL[], required | — | Reference images, Image 1, Image 2, … |
Per output second: $0.08 at 480p and $0.14 at 720p, plus $0.01 per reference image.
| Output | 480p | 720p |
|---|---|---|
| 8s (default) | $0.65 | $1.13 |
| 15s | $1.21 | $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/lite/text-to-video, xai/grok-imagine-video/1.5/lite/image-to-video, xai/grok-imagine-video/text-to-video (previous version).
Geliştirmeye başlayın
Bu modeli SandBase Unified Run API üzerinden gönderin.
# 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/reference-to-video",
"prompt": "The person from <IMAGE_0> walks through a rainy neon-lit street.",
"duration": 8,
"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"Bir SandBase API anahtarı oluşturun ve sunucu ortamınıza ayarlayın. Tüm istekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın veya bir depoya commit etmeyin.
Bu model kimliği ve girdileriyle /v1/run adresine POST gönderin. Yukarıdaki istek örneği gönderme ve yoklamayı içerir.
Durum completed, failed veya timeout olana kadar verilen run ID ile yoklama yapın. Çıktıyı yalnızca completed olduktan sonra okuyun.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Modelin image, video veya audio alanına herkese açık erişilebilir bir dosya URL'si verin. Desteklenen formatlar ve sınırlar her Playground girişinin yanında gösterilir.
Playground'daki desteklenen image alanlarında yükleme veya değiştirme kontrolünü kullanın. Video URL alanları barındırılan bir sürüş videosu kabul eder; video yükleme desteği anlamına gelmez.
imagesarrayzorunluOne or more reference image URLs to guide the video generation as style and content references. Reference in prompt as <IMAGE_0>, <IMAGE_1>, etc. Maximum 7 images.
promptstringzorunluText prompt describing the video. Tag references as <IMAGE_0>, <IMAGE_1>, etc.
durationintegerVideo duration in seconds.
Varsayılan: 8
Minimum: 1
Maksimum: 15
resolutionstringResolution of the output video.
Varsayılan: "720p"
Olası değerler: "480p", "720p"
aspect_ratiostringThe aspect ratio of the generated image.
Olası değerler: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
{
"model": "xai/grok-imagine-video/1.5/reference-to-video",
"prompt": "The person from <IMAGE_0> walks through a rainy neon-lit street.",
"duration": 8,
"resolution": "720p"
}Tamamlanan bir run, sonucunu output içinde gösterir. Aşağıdaki, modelin kaydedilmiş örneğidir; yeni bir üretim değildir.
[
{
"poster": "https://static.sandbase.ai/examples/posters/d087fb8ab1ef444377f3.jpg",
"source": "Completed user prediction (human visual safety screened)",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/182071c8-4a68-49d6-8ddb-2e1ba5af7d4d/output/95798e92-c36f-4ca4-bd1a-bcff7dcee1ca.mp4"
}
]