Skip to content
English

Grok Imagine 1.5 Image to Video API

POST Base URL: https://api.hiapi.ai /v1/tasks

Image, video, and audio models are called through theUnified 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
Type Video generation (image-to-video)
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

xAI Grok Imagine 1.5 image-to-video: upgraded motion quality over 1.0, 1-7 reference images, flexible 1-15 second clips at 480p/720p/1080p, billed per second.

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 or 1080p.

resolution
Follows input framing

With a single image the output always follows the input framing — portrait or landscape, no cropping. aspect_ratio only applies with multiple reference images.

aspect_ratio
Multi-image reference

Pass up to 7 reference images to combine shots; the 1080p tier accepts a single input image only.

image_urls

Request parameters

model string required

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

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

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

prompt string optional

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

image_urls string[] required

Reference image URLs, 1-7 images. JPEG/PNG/WebP (SVG not supported), up to 20MB each. When resolution is 1080p, exactly 1 image is allowed.

aspect_ratio enum optional

Output video aspect ratio. With a single input image this parameter has no effect and the output always follows the input image ratio; it only applies when multiple reference images are provided.

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

Output resolution tier. 720p and 1080p cost more per second; 1080p is the highest quality and only accepts a single input image. 1080p is a quality tier, not a fixed 1920x1080 frame: actual pixels follow the input image ratio.

default 480p enum: 480p720p1080p
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; http(s) 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",
  "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"
    ],
    "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",
  "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"
    ],
    "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 different from grok-imagine 1.0?

1.5 is xAI's upgraded generation: clearly better motion quality and flexible 1-15 second durations, at the same per-second price as 1.0.

How many reference images can I pass?

image_urls accepts 1-7 reference images; when resolution is 1080p, exactly 1 image is allowed. With multiple images, aspect_ratio selects the output framing; with a single image the framing follows the input image.

Why is 1080p output not 1920x1080?

1080p is a quality tier, not a fixed pixel size. Image-to-video output always follows the input image ratio and the 1080p tier only raises sharpness — a 4:3 input renders around 1664x1248 at 1080p.

How is it billed?

Per second, with separate rates for 480p, 720p, and 1080p: 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