X AI Grok Imagine Video V1.5 Image To Video API Documentation

X AI Grok Imagine Video V1.5 Image To Video API Documentation

Playground

Try it on WaveSpeedAI!

xAI Grok Imagine Video v1.5 Image-to-Video turns a single input image and a natural-language prompt into short, stylized AI videos, with 480P, 720P, and 1080P output options and selectable aspect ratios for character animation, product videos, social media content, creative storytelling, and marketing workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

xAI Grok Imagine Video V1.5 Image-to-Video generates short videos from a reference image and a natural-language prompt. It is designed for image-driven motion generation, cinematic concept clips, stylized social media content, and other prompt-based video creation workflows.


Why Choose This?

  • Image-guided video generation Start from a single reference image and animate it into a short video clip.

  • Prompt-based motion control Use text instructions to describe motion, camera behavior, atmosphere, and scene evolution.

  • Simple resolution choices Choose between 480p and 720p depending on your quality and budget needs.

  • Predictable short-form generation Works well for short clips that need quick iteration and clean prompt-to-video control.

  • Production-ready API Suitable for concept visualization, creator content, ads, and lightweight motion storytelling.


Parameters

ParameterRequiredDescription
promptYesText description of the desired motion, camera movement, and scene.
imageYesInput image to animate.
durationNoOutput video duration in seconds. Range: 1–15. Default: 6.
resolutionNoOutput video resolution. Supported values: 480p, 720p. Default: 720p.

How to Use

  1. Upload your image — provide the source image you want to animate.
  2. Write your prompt — describe the motion, scene, and camera behavior you want.
  3. Set duration (optional) — choose how long the video should be.
  4. Choose resolution — use 480p for lower cost or 720p for higher quality.
  5. Submit — run the model and download the generated video.

Example Prompt

A cinematic push-in shot as the subject slowly turns toward the camera, soft natural motion, subtle background movement, realistic lighting, polished commercial style


Pricing

Pricing depends on output duration and resolution.

ResolutionPrice per Second5s Example
480p$0.08$0.40
720p$0.14$0.70

Each request includes a fixed $0.01 input image charge.

Example Costs

Resolution1s5s10s15s
480p$0.09$0.41$0.81$1.21
720p$0.15$0.71$1.41$2.11

Billing Rules

  • 480p costs $0.08 per second
  • 720p costs $0.14 per second
  • Each input image adds $0.01
  • Pricing scales linearly with duration
  • Billed duration is rounded up to the next whole second
  • Minimum billed duration is 1 second
  • Maximum billed duration is 15 seconds

Best Use Cases

  • Image-to-video animation — Turn a still image into a short motion clip.
  • Social media content — Create lightweight animated visuals for posts and promos.
  • Concept visualization — Explore motion directions from a static frame.
  • Advertising mockups — Turn still campaign art into short animated demos.
  • Creative prototyping — Quickly test prompt-driven motion ideas.

Pro Tips

  • Use a clear, high-quality source image for better motion stability.
  • Be specific in your prompt about camera movement, subject motion, and atmosphere.
  • Start with shorter durations for fast iteration.
  • Use 480p for quick testing and 720p for better final-quality clips.
  • Keep prompts focused on motion and scene evolution rather than repeating static visual details already present in the image.

Notes

  • prompt and image are required.
  • duration supports 1–15 seconds.
  • resolution defaults to 720p.
  • Pricing depends on duration, resolution, and the fixed per-image surcharge.

  • xAI text-to-image workflows — Useful when you want to generate the source image first.
  • Other image-to-video workflows — Useful when you need different quality, speed, or motion-control tradeoffs.

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result

set -euo pipefail

export WAVESPEED_API_KEY="your-api-key"

REQUEST_BODY=$(cat <<'JSON'
{
  "prompt": "A cinematic ocean wave at sunrise, highly detailed",
  "image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
  "duration": 6,
  "resolution": "720p"
}
JSON
)

# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  -X POST "https://api.wavespeed.ai/api/v3/x-ai/grok-imagine-video-v1.5/image-to-video" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}")

TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
  printf 'Submission response did not contain a prediction id
' >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction finishes.
while true; do
  RESPONSE=$(curl --silent --show-error --fail-with-body \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}")
  RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

  case "${STATUS}" in
    completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
    failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
    *) sleep 2 ;;
  esac
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-Text description of the desired motion, camera movement, and scene.
imagestringYes-Input image to animate.
durationintegerNo61 ~ 15Output video duration in seconds.
resolutionstringNo720p480p, 720p, 1080pOutput video resolution.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<string | object>Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model.
data.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.