Grok Imagine Video 1.5 API

video

Video generation by xai

xAI text-to-video and image-to-video model with native audio and native 1080p.

Call Grok Imagine Video 1.5 from Node.js, Python, or any HTTP client. No GPU provisioning, no cold starts, no Docker images — just an API key and a prompt.

Pay per request. Powering 1M+ generations daily.

Start in 60 seconds

Install the official SDK for Node.js or Python, drop in your API key, and generate your first video.

npm install getimg-ai
import GetimgAI from "getimg-ai";

const client = new GetimgAI();

const submission = await client.videos.generations.create({
    model: "grok-imagine-video-1.5",
    prompt: "Ultra-photorealistic iPhone TikTok filmed in a completely ordinary office. Open-plan office, neutral carpet, cheap printer station, stacks of paper, charging cables, coffee mugs, normal ceiling LEDs.",
    aspect_ratio: "16:9",
    resolution: "480p",
    duration: 1
  });
const requestId = submission.id;

// Poll
let result;
while (true) {
  result = await client.videos.generations.retrieve(requestId);

  if (result.status === "completed") break;
  if (result.status === "failed") {
    throw new Error(result.error.message);
  }

  await new Promise((r) => setTimeout(r, 5000));
}

console.log(result.data[0].url);

How Grok Imagine Video 1.5 API works

Submit a generation request, poll for completion, download the video.

1

Get your API key

Create a key in the Developer Dashboard. Add credit and start calling — you are billed per request.

2

Send a request

POST to /v2/videos/generations with your prompt, duration, and resolution.

3

Get your video

Poll the status endpoint. When it completes, download the video from the returned URL.

What you can build with Grok Imagine Video 1.5

Every example uses the same authentication and works with the official getimg-ai and getimg SDKs, or plain HTTP.

Text to video

Generate a video using just a text prompt.

import GetimgAI from "getimg-ai";

const client = new GetimgAI();

const submission = await client.videos.generations.create({
    model: "grok-imagine-video-1.5",
    prompt: "Ultra-photorealistic iPhone TikTok filmed in a completely ordinary office. Open-plan office, neutral carpet, cheap printer station, stacks of paper, charging cables, coffee mugs, normal ceiling LEDs.",
    aspect_ratio: "16:9",
    resolution: "480p",
    duration: 1
  });
const requestId = submission.id;

// Poll
let result;
while (true) {
  result = await client.videos.generations.retrieve(requestId);

  if (result.status === "completed") break;
  if (result.status === "failed") {
    throw new Error(result.error.message);
  }

  await new Promise((r) => setTimeout(r, 5000));
}

console.log(result.data[0].url);

Image to video

Animate a still image as the starting frame.

import GetimgAI from "getimg-ai";

const client = new GetimgAI();

const submission = await client.videos.generations.create({
    model: "grok-imagine-video-1.5",
    prompt: "Animate the scene with subtle camera movement and natural motion.",
    aspect_ratio: "16:9",
    resolution: "480p",
    duration: 1,
    images: [
      {
        url: "https://your-bucket.s3.amazonaws.com/first.png",
        role: "first_frame"
      }
    ]
  });
const requestId = submission.id;

// Poll
let result;
while (true) {
  result = await client.videos.generations.retrieve(requestId);

  if (result.status === "completed") break;
  if (result.status === "failed") {
    throw new Error(result.error.message);
  }

  await new Promise((r) => setTimeout(r, 5000));
}

console.log(result.data[0].url);

Grok Imagine Video 1.5 pricing

Pay per video. No subscriptions, no minimums, no idle GPU costs.

Grok Imagine Video 1.5

$0.09 – $0.29 /second

/v2/videos/generations

xAI text-to-video and image-to-video model with native audio and native 1080p.

ResolutionPrice5s videos for $10
480p$0.09 /second22
720p$0.16 /second12
1080p$0.29 /second6

More from xai

Other xai models available through the same API.

Grok Imagine Video 1.5 API — frequently asked questions

How do I use the Grok Imagine Video 1.5 API?

Install the official Node.js (npm install getimg-ai) or Python (pip install getimg) SDK, or call the endpoint directly over HTTP from any client.

Make a POST request to /v2/videos/generations with your API key and a JSON body containing the model ID (grok-imagine-video-1.5) and a prompt. The API returns a request ID. Poll the status endpoint until the video is ready.

See the API documentation for the full parameter reference.

Which SDK should I use?

Use getimg-ai for Node.js and TypeScript projects, and getimg for Python. Both wrap the same REST API with typed inputs, retries, and built-in polling for video generations.

For other languages — Go, Rust, Java, Ruby, PHP — call the HTTP endpoints directly. Every example on this page includes a cURL snippet you can port to any HTTP client.

What resolutions does Grok Imagine Video 1.5 support?

Grok Imagine Video 1.5 supports the following resolutions: 480p, 720p, 1080p across 7 aspect ratios (16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3). Videos can be 1 to 15 seconds long.

How much does Grok Imagine Video 1.5 cost?

Grok Imagine Video 1.5 uses pay-per-video pricing with no subscriptions or minimum commitments. Rates vary by resolution and sound options. See the pricing table above for exact rates per second.

Does Grok Imagine Video 1.5 support reference images?

Yes. Grok Imagine Video 1.5 accepts up to 1 first frame. Reference images guide the generation toward a specific style, composition, or subject. See the example above.

Start building with Grok Imagine Video 1.5

Grab an API key, install the SDK, ship video generation today.

Looking for other models? View all available models