promptstringobbligatorio
Text description of the desired video.
xai/grok-imagine-video/1.5/text-to-videoGrok Imagine Video 1.5 by xAI - generate cinematic videos from text descriptions with AI. Create high-quality video content with natural motion, camera control, and optional audio generation.
Prova il modello
Cosa vuoi fare dopo?
Seleziona un esempio per caricare i suoi input e il risultato nel playground.
{
"prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines indicating rush, chibi-ready expressions, classic shojo aesthetic, vibrant colors"
}Preferenza umana
Punteggi Elo da voti anonimi affiancati, confrontati con altri modelli di immagini e video.
Classifiche tratte da Artificial Analysis Arena
Arena text-to-video (senza audio): le persone scelgono la migliore di due clip generate dallo stesso prompt, senza vedere i nomi dei modelli; l'audio non viene valutato.
Grok Imagine Video 1.5 turns a prompt into a 1–15 second clip with native audio, up to 1080p.
| 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 / 1080p | 720p | Sets the per-second rate. |
duration | integer 1–15 | 6 | Output length in seconds. |
Per output second: $0.08 at 480p, $0.14 at 720p, $0.25 at 1080p.
| Output | 480p | 720p | 1080p |
|---|---|---|---|
| 6s (default) | $0.48 | $0.84 | $1.50 |
| 10s | $0.80 | $1.40 | $2.50 |
| 15s | $1.20 | $2.10 | $3.75 |
Failed runs are not charged.
Other Grok Imagine Video 1.5 endpoints: 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/1.5/lite/image-to-video, xai/grok-imagine-video/text-to-video (previous version).
Inizia a costruire
Invia questo modello tramite la 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/text-to-video",
"prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines indicating rush, chibi-ready expressions, classic shojo aesthetic, vibrant colors",
"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"Crea una SandBase API key e impostala nell'ambiente del server. Tutte le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la key sul server. Non esporla nel codice del browser né committarla in un repository.
Esegui POST su /v1/run con questo ID modello e i relativi input. L'esempio di richiesta sopra include invio e polling.
Usa il run ID restituito per fare polling finché lo stato non è completed, failed o timeout. Leggi l'output solo dopo completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passa un URL di file accessibile pubblicamente nel campo image, video o audio del modello. I formati supportati e i limiti sono mostrati accanto a ciascun input del Playground.
Usa il controllo upload o replace sui campi immagine supportati nel Playground. I campi URL video accettano un video di driving ospitato; non implicano il supporto al caricamento video.
promptstringobbligatorioText description of the desired video.
durationintegerVideo duration in seconds.
Predefinito: 6
Minimo: 1
Massimo: 15
resolutionstringResolution of the output video.
Predefinito: "720p"
Valori possibili: "480p", "720p", "1080p"
aspect_ratiostringThe aspect ratio of the generated image.
Valori possibili: "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/text-to-video",
"prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines indicating rush, chibi-ready expressions, classic shojo aesthetic, vibrant colors",
"duration": 6,
"resolution": "720p"
}Un run completato espone il risultato in output. Quanto segue è l'esempio salvato del modello, non una nuova generazione.
[
{
"poster": "https://static.sandbase.ai/examples/posters/22dfa1b4ca0e60107aa1.jpg",
"source": "xAI schema mirror",
"source_url": "https://docs.x.ai/",
"url": "https://static.sandbase.ai/examples/f74444a8-1998-4356-bde9-c63a5d099062/output/c4b85dd4-9139-40ce-b8ac-7a7856f2700c.mp4"
}
]