imagestring
Optional image to start the video from (upload or public HTTPS URL).
x-ai/grok-imagine-video-1.5-liteGrok Imagine Video 1.5 Lite by xAI makes a 1 to 15 second video with native audio, up to 1080p, from text or a first frame, from $0.02 per second. Call it from this page, through /v1/run, or with the xAI Videos API at SandBase.
モデルを試す
PNG、JPEG、WebP、GIF · 最大 20 MiB
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Grok Imagine Video 1.5 Lite is the low-cost version of Grok Imagine Video 1.5, from $0.02 per second. It makes a 1 to 15 second clip with native audio from a prompt or a first frame, up to 1080p.
Use the form on this page, call x-ai/ through /v1/run, or call the xAI API below with model: grok-imagine-video-1.5-lite. Both bill the same as xAI.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string | — | Scene, motion, camera and sound. Required without a first frame. |
image | image | — | First frame. |
duration | integer 1–15 | 8 | Output length in seconds. |
resolution | 480p720p1080p | 480p | Sets the per-second rate. |
aspect_ratio | 16:99:161:14:33:43:22:321:95:2 | 16:9, or the first frame's shape | Output shape. |
Reference images, a last frame, keyframes and reference audio are not available on Lite.
SandBase implements xAI's Images and Videos API under https://api.sandbase.ai/grok/v1. Requests and responses match xAI's API reference field by field, so the xAI SDK or any OpenAI-style HTTP client works after you change the base URL and use your SandBase API key.
| xAI | SandBase | |
|---|---|---|
| Base URL | https://api.x.ai/v1 | https://api.sandbase.ai/grok/v1 |
| Create | POST /videos/generations | POST /videos/generations |
| Retrieve | GET /videos/{request_id} | GET /videos/{request_id} |
model | grok-imagine-video-1.5-lite | grok-imagine-video-1.5-lite |
curl https://api.sandbase.ai/grok/v1/videos/generations \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "grok-imagine-video-1.5-lite", "prompt": "A red fox runs through deep snow", "duration": 8, "resolution": "720p"}'
The response is {"request_id": "..."}. Poll GET /grok/v1/videos/{request_id} every 5 to 10 seconds. pending means keep polling; done returns video.url, video.duration and usage.cost_in_usd_ticks (the charge in units of 1/10,000,000,000 USD); failed and expired are final and are not billed. Media can be public HTTPS or data: URLs. output and storage_options are not supported.
Per output second: $0.02 at 480p, $0.03 at 720p, $0.14 at 1080p. A first frame adds $0.01. Failed runs are not billed.
| Output | 480p | 720p | 1080p |
|---|---|---|---|
| 8s (default) | $0.16 | $0.24 | $1.12 |
| 15s | $0.30 | $0.45 | $2.10 |
開発を始める
このモデルを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": "x-ai/grok-imagine-video-1.5-lite",
"prompt": "A red fox runs through deep snow, the camera tracks beside it, wind and crunching snow",
"duration": 8,
"resolution": "480p"
}
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"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
imagestringOptional image to start the video from (upload or public HTTPS URL).
promptstringDescribe the scene, motion, camera and sound. Required without a first frame.
durationintegerOutput length in seconds (1-15). Billed per second.
デフォルト: 8
最小: 1
最大: 15
resolutionstring480p, 720p or 1080p.
デフォルト: "480p"
指定可能な値: "480p", "720p", "1080p"
aspect_ratiostringOutput aspect ratio. Omit it to use 16:9, or the first frame's shape when you give one.
指定可能な値: "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9", "5:2"
{
"model": "x-ai/grok-imagine-video-1.5-lite",
"prompt": "A red fox runs through deep snow, the camera tracks beside it, wind and crunching snow",
"duration": 8,
"resolution": "480p"
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
まだ例の出力は公開されていません。完了したrunのレスポンスを確認するには、Playground → Result → JSON を使用してください。