Skip to content
English

Grok Imagine 1.5 Image to Video (Preview) API

POST /v1/tasks

All models are called through the Unified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).

Model summary

Model name grok-imagine-1.5/image-to-video@preview
Type Video generation (image-to-video)
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

xAI Grok Imagine 1.5 (preview) image-to-video: upgraded motion quality over 1.0, flexible 1-15 second clips at 480p/720p, billed per second at the same price as 1.0.

Production guidance

Production guidance
  • For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
  • GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
  • Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.

Best suited for

Upgraded image animation

Clearly better motion than 1.0 — smoother action, steadier camera — at the same price.

image_urlsprompt
Flexible 1-15s duration

Any integer duration from 1 to 15 seconds, billed per second — quick idea checks or longer shots.

duration
Cheap iteration

The 480p tier is extremely cheap — iterate low-res, deliver at 720p.

resolution
Follows input framing

aspect_ratio defaults to auto and follows the input image — portrait or landscape, no cropping.

aspect_ratio

Request parameters

model string required

Fixed value grok-imagine-1.5/image-to-video@preview.

example grok-imagine-1.5/image-to-video@preview
input object required

Business parameters. Put Grok Imagine 1.5 Image to Video (Preview)-specific configuration here.

prompt string optional

Optional text prompt describing the desired motion (English works best). Maximum 4096 characters.

image_urls string[] required

Input image URL to animate (exactly 1 image). JPEG/PNG/WebP, up to 20MB.

aspect_ratio enum optional

Output video aspect ratio. auto follows the input image.

default auto enum: auto1:116:99:163:22:3
resolution enum optional

Output video resolution. 720p costs more per second.

default 480p enum: 480p720p
duration integer optional

Clip length in seconds, 1-15. Cost scales with duration.

default 8
callback object optional

Optional callback configuration. When set, HiAPI notifies your service when the task reaches a terminal state.

url string required

Required when callback is set; HTTPS URL that receives terminal task notifications.

example https://your-domain.com/hiapi/callback
when enum optional

Callback trigger timing. Use final.

default final enum: final

Example requests

Jellyfish drift (720p/6s)

Delivery tier — motion quality and lighting consistency.

Request body
{
  "model": "grok-imagine-1.5/image-to-video",
  "route": "preview",
  "input": {
    "prompt": "The giant jellyfish slowly pulses and drifts upward, its lace tentacles flowing gracefully, the school of silver fish spirals around it, gentle cinematic push-in, smooth natural motion, consistent lighting across frames",
    "image_urls": [
      "https://static.hiapi.ai/previews/nano-banana-2-lite/2026/07/03/1783076311460-2afd2d0092234bc7-nano-lite-cover.webp"
    ],
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration": 6
  }
}
Desert camp push-in (480p iteration)

Cheapest way to validate a motion idea.

Request body
{
  "model": "grok-imagine-1.5/image-to-video",
  "route": "preview",
  "input": {
    "prompt": "The camera slowly glides forward over the dune ridges toward the glowing tent, the shooting star fades, stars twinkle gently, lantern light flickers softly inside the tent, smooth natural motion",
    "image_urls": [
      "https://static.hiapi.ai/previews/nano-banana-2-lite/2026/07/03/1783076316176-b9c9c7b278a01155-nano-lite-g2-desert.webp"
    ],
    "aspect_ratio": "auto",
    "resolution": "480p",
    "duration": 6
  }
}

Getting the result

  1. The response returns a taskId immediately without waiting for generation to finish.
  2. In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
  3. When status=success, download the generated video from output[].url.
  4. When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.

FAQ

How is 1.5 preview different from grok-imagine 1.0?

1.5 is xAI's upgraded preview: clearly better motion quality and flexible 1-15 second durations, at the same per-second price as 1.0. Preview means upstream behavior may shift slightly before the stable release; we will switch over smoothly when it lands.

How is it billed?

Per second, with separate rates for 480p and 720p: total = per-second rate x duration. See the pricing page for live rates. View pricing

How should I prompt for reliable motion?

Describe one clear, single motion per prompt (e.g. "gentle camera push-in", "seeds drift toward the camera"). English works best; avoid stacking conflicting motion instructions.

How do I get the generated video?

The request returns a taskId immediately. When the task reaches a terminal state, download the video from output[].url. In production, pass callback.url at the top level of the request body instead of polling.

Next steps