Pixazo API→Models→Text to Video API→Grok Imagine Video
Pixazo API→Models→Text to Video API→Grok Imagine Video

Grok Imagine Video 1.5 Lite API, Grok Imagine Video 1.5 API, Grok Imagine Video 1.5 Turbo API: Pricing, Documentation

by xAI

Grok Imagine Video by xAI supports text-to-video, image-to-video, video editing, and reference-driven multi-image video synthesis. Through Pixazo's API, developers can generate, animate, and edit video content with xAI's flagship video model.

Get API Key
Grok Imagine Video API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

Grok Imagine Video 1.5 Lite API Documentation

Generate a video from a text prompt with Grok Imagine Video 1.5 Lite from xAI: clips of 1 to 15 seconds at 480p, 720p or 1080p, in seven aspect ratios. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - Grok Imagine Video 1.5 Lite

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A paper boat drifting down a rain-soaked city street at night, neon reflections rippling on the water, low tracking shot",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A paper boat drifting down a rain-soaked city street at night, neon reflections rippling on the water, low tracking shot",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A paper boat drifting down a rain-soaked city street at night, neon reflections rippling on the water, low tracking shot",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A paper boat drifting down a rain-soaked city street at night, neon reflections rippling on the water, low tracking shot", "duration": 6, "resolution": "720p", "aspect_ratio": "16:9"}'

Output

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A paper boat drifting down a rain-soaked city street at night, neon reflections rippling on the water, low tracking shot", "duration": 6, "resolution": "720p", "aspect_ratio": "16:9"}'

Callback Payload (success)

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-06T10:04:54.387Z",
  "completed_at": "2026-10-06 10:06:21"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5-lite",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1–4,096 charactersWhat the video shows: subject, action, setting, camera movement, lighting and mood.
durationNointeger61–15 (whole seconds)Length of the video in seconds. This is the length that is billed. A number, not a string.
resolutionNostring"720p"480p, 720p, 1080pOutput resolution. It sets the rate billed per second. Values are case-sensitive.
aspect_ratioNostring"16:9"16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16Frame shape of the video. It does not change the amount billed.

Good to know

  • To animate an image, use the Image to Video operation; image_url, image_urls and image are rejected here.
  • Each request returns one video. num_images, batch_size, number_of_images, n, count are rejected — send one request per video.
  • Set the length with duration only, in whole seconds from 1 to 15. seconds, num_frames, frames_per_second, music_length_ms are rejected.
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content, text are rejected.
  • Values are case-sensitive: use 720p, not 720P.
  • When you leave a field out, the defaults apply: 6 seconds and 720p, in 16:9. Set duration and resolution explicitly for a predictable length and rate.
  • There is no seed parameter.
  • Omit optional fields you do not use — do not send them as null.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url and webhook_mode in the JSON body are rejected.

Resolution and Length

resolution sets the output resolution and the rate billed per second; duration sets the length in whole seconds, from 1 to 15. When you leave them out the defaults are 720p and 6 seconds — set both explicitly for a predictable length and rate.

ResolutionNotes
480pLowest resolution
720pThe default
1080pHighest resolution

Aspect ratios

16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16. 16:9 is the default; landscape, square and portrait shapes are all available.

Example Request

{
  "prompt": "A paper boat drifting down a rain-soaked city street at night, neon reflections rippling on the water, low tracking shot",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

Example Response

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid parameters — a required field is missing, or a value has the wrong type, is out of range or is not one of the allowed values. The message names the field.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, or a prompt longer than 4,096 characterssynchronous 400
duration not a whole number from 1 to 15 — for example 0, 16, 5.5 or the string "6"synchronous 400
resolution or aspect_ratio not one of the allowed values (values are case-sensitive: 720p, not 720P)synchronous 400
image_url, image_urls or image (send images to the Image to Video operation)synchronous 400
num_images, batch_size, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
webhook_url or webhook_mode in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
A prompt the provider refuses, for example under its content policystatus: "ERROR"

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-06T10:04:54.387Z",
  "completed_at": "2026-10-06 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — grok-imagine-video-1-5-lite for this endpoint.
output.media_urlarray of stringsURL of the generated video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How billing is measured

Billing is measured per second of video at the rate for the resolution in the request — 720p when you leave it out. The billed length is the duration you request — 6 seconds when you leave it out. Each request generates one video; the aspect ratio does not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails.

The current rate is shown in the pricing panel on this page.

Grok Imagine Video 1.5 Lite API Pricing

Billed per second of video by the resolution parameter (480p, 720p, 1080p); aspect ratio does not change the price. 720p and 6 seconds are the defaults. One video per request.

ResolutionPrice (USD)
480p / per second$0.02
720p / per second$0.03
1080p / per second$0.14
Each input image (Image to Video only)$0.01
Image to Video

Grok Imagine Video 1.5 Lite API Documentation

Animate a still image with Grok Imagine Video 1.5 Lite from xAI: send one image and a prompt describing the motion, and get a clip of 1 to 15 seconds at 480p, 720p or 1080p that takes its shape from the image. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - Grok Imagine Video 1.5 Lite

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "Slow push-in as the subject turns toward the camera, hair moving in a light breeze, warm natural light",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 6,
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "Slow push-in as the subject turns toward the camera, hair moving in a light breeze, warm natural light",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 6,
  "resolution": "720p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "Slow push-in as the subject turns toward the camera, hair moving in a light breeze, warm natural light",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 6,
  "resolution": "720p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "Slow push-in as the subject turns toward the camera, hair moving in a light breeze, warm natural light", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 6, "resolution": "720p"}'

Output

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "Slow push-in as the subject turns toward the camera, hair moving in a light breeze, warm natural light", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 6, "resolution": "720p"}'

Callback Payload (success)

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-06T10:04:54.387Z",
  "completed_at": "2026-10-06 10:06:21"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5-lite",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstring—1–4,096 charactersThe motion or change you want: what moves, how the camera moves, the mood. Required here too.
image_urlYesstring—One JPEG, PNG or WebP image: a publicly reachable https URL or a data URIThe source image to animate. The video takes its shape from this image.
durationNointeger61–15 (whole seconds)Length of the video in seconds. This is the length that is billed. A number, not a string.
resolutionNostring"720p"480p, 720p, 1080pOutput resolution. It sets the rate billed per second. Values are case-sensitive.

Good to know

  • Send exactly one image as image_url; image_urls and image are rejected.
  • aspect_ratio is rejected on this operation: the video takes its shape from the source image.
  • Each request returns one video. num_images, batch_size, number_of_images, n, count are rejected — send one request per video.
  • Set the length with duration only, in whole seconds from 1 to 15. seconds, num_frames, frames_per_second, music_length_ms are rejected.
  • Send every field at the top level of the JSON body, with the text in prompt; parameters, content, text are rejected.
  • Values are case-sensitive: use 720p, not 720P.
  • When you leave a field out, the defaults apply: 6 seconds and 720p. Set duration and resolution explicitly for a predictable length and rate.
  • There is no seed parameter.
  • Omit optional fields you do not use — do not send them as null.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url and webhook_mode in the JSON body are rejected.

Resolution and Length

resolution sets the output resolution and the rate billed per second; duration sets the length in whole seconds, from 1 to 15. When you leave them out the defaults are 720p and 6 seconds — set both explicitly for a predictable length and rate.

ResolutionNotes
480pLowest resolution
720pThe default
1080pHighest resolution

Shape

The video takes its shape from the source image, so this operation has no aspect_ratio parameter — a request that sends one is rejected.

Source Image

  • Send exactly one image in image_url: a publicly reachable https URL, or a data URI such as data:image/png;base64,.... A list of images is rejected.
  • Use a JPEG, PNG or WebP file. The image is downloaded when you submit: a URL that cannot be downloaded, or that returns a web page or an empty file instead of an image, is refused at once with a 400.
  • The video takes its shape from the source image, so there is no aspect_ratio parameter on this operation.
  • Describe the motion in prompt: what moves, how the camera moves, and the mood.
  • The input image is billed once per request, on top of the per-second amount.

Example: send the image as a data URI

{
  "prompt": "Slow push-in as the subject turns toward the light",
  "image_url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...",
  "duration": 6,
  "resolution": "720p"
}

Example Request

{
  "prompt": "Slow push-in as the subject turns toward the camera, hair moving in a light breeze, warm natural light",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 6,
  "resolution": "720p"
}

Example Response

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid parameters — a required field is missing, or a value has the wrong type, is out of range or is not one of the allowed values. The message names the field.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An image that cannot be downloaded is also refused at submit with a 400, and its hold is released at once. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, or a prompt longer than 4,096 characterssynchronous 400
Missing or empty image_url, or image_url sent as anything other than a single stringsynchronous 400
An image_url that cannot be downloaded at submit, or that returns a web page or an empty file instead of an image (the hold is released at once)synchronous 400
duration not a whole number from 1 to 15 — for example 0, 16, 5.5 or the string "6"synchronous 400
resolution not one of the allowed values (values are case-sensitive: 720p, not 720P)synchronous 400
aspect_ratio (not accepted here: the video takes its shape from the source image)synchronous 400
image_urls or image (send exactly one image, as image_url)synchronous 400
num_images, batch_size, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second, music_length_ms (set the length with duration)synchronous 400
parameters, content, text (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
webhook_url or webhook_mode in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
An image the model cannot use, for example a file that is not a JPEG, PNG or WebP imagestatus: "ERROR"
A prompt or image the provider refuses, for example under its content policystatus: "ERROR"

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "grok-imagine-video-1-5-lite_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5-lite",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-06T10:04:54.387Z",
  "completed_at": "2026-10-06 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — grok-imagine-video-1-5-lite for this endpoint.
output.media_urlarray of stringsURL of the generated video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How billing is measured

Billing is measured per second of video at the rate for the resolution in the request — 720p when you leave it out — plus a fixed amount for the one input image. The billed length is the duration you request — 6 seconds when you leave it out. Each request generates one video. The amount is placed as a hold when the request is submitted and released in full if the request fails.

The current rate is shown in the pricing panel on this page.

Grok Imagine Video 1.5 Lite API Pricing

Billed per second of video by the resolution parameter (480p, 720p, 1080p), plus the one input image. 720p and 6 seconds are the defaults. The video keeps the source image's aspect ratio.

ResolutionPrice (USD)
480p / per second$0.02
720p / per second$0.03
1080p / per second$0.14
Each input image (Image to Video only)$0.01
2. Grok Imagine Video 1.5

Grok Imagine Video 1.5 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video v1.5 Text to Video generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/text-to-video
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
  "duration": 6,
  "aspect_ratio": "16:9",
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
    "duration": 6,
    "aspect_ratio": "16:9",
    "resolution": "720p"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/text-to-video";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
  "duration": 6,
  "aspect_ratio": "16:9",
  "resolution": "720p"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/text-to-video" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
    "duration": 6,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'

Output

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video v1.5 Text to Video generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text description of the desired video.
durationNointeger61–15 (seconds)Video duration in seconds.
aspect_ratioNoenum"16:9""16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"Aspect ratio of the generated video.
resolutionNoenum"720p""480p", "720p", "1080p"Resolution of the output video. Higher resolutions cost more per second.

Example Request

{
  "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
  "duration": 6,
  "aspect_ratio": "16:9",
  "resolution": "720p"
}

Response

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-1-5' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.5 API Pricing

ResolutionPrice (USD)
480p / per second$0.08
720p / per second$0.14
1080p / per second$0.25
Image to Video

Grok Imagine Video 1.5 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video v1.5 Image to Video generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/image-to-video
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "The character turns toward the camera and smiles, cinematic camera move",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
  "duration": 6,
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "The character turns toward the camera and smiles, cinematic camera move",
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
    "duration": 6,
    "resolution": "720p"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/image-to-video";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "The character turns toward the camera and smiles, cinematic camera move",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
  "duration": 6,
  "resolution": "720p"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/image-to-video" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "The character turns toward the camera and smiles, cinematic camera move",
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
    "duration": 6,
    "resolution": "720p"
  }'

Output

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your generate request to receive a POST callback instead of polling.

X-Webhook-URL: https://your-server.com/webhook/callback

Request Parameters - Grok Imagine Video v1.5 Image to Video generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring—≤ 4096 charactersText description of the desired changes or motion in the video.
image_urlYesstring—jpg, jpeg, png, webp, gif, avifPublicly reachable URL of the input image to animate.
durationNointeger61–15 (seconds)Video duration in seconds.
resolutionNoenum"720p""480p", "720p", "1080p"Resolution of the output video. Higher resolutions cost more per second.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPInput image to animate.

Example Request

{
  "prompt": "The character turns toward the camera and smiles, cinematic camera move",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/Image.jpeg",
  "duration": 6,
  "resolution": "720p"
}

Response

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-1-5' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.5 API Pricing

ResolutionPrice (USD)
480p / per second$0.08
720p / per second$0.14
1080p / per second$0.25
Reference to Video (Ref Images to Video)

Grok Imagine Video 1.5 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/reference-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video v1.5 Reference to Video generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/reference-to-video
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "A person from <IMAGE_0> running through a sunlit meadow, cinematic slow motion",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/reference-to-video"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "A person from <IMAGE_0> running through a sunlit meadow, cinematic slow motion",
    "reference_image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    ],
    "duration": 8,
    "aspect_ratio": "16:9",
    "resolution": "480p"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/reference-to-video";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "A person from <IMAGE_0> running through a sunlit meadow, cinematic slow motion",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-1-5/v1/reference-to-video" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "A person from <IMAGE_0> running through a sunlit meadow, cinematic slow motion",
    "reference_image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    ],
    "duration": 8,
    "aspect_ratio": "16:9",
    "resolution": "480p"
}'

Output

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video v1.5 Reference to Video generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring—1–4096 charactersText prompt describing the video. Refer to the reference images in the prompt as <IMAGE_0>, <IMAGE_1> and so on.
reference_image_urlsYesarray of string—1–7 URLsOne or more publicly reachable reference image URLs used as style and content guidance. They are tagged in prompt order: the first URL is <IMAGE_0>, the second is <IMAGE_1>, and so on.
durationNointeger81–15 (seconds)Video duration in seconds.
aspect_ratioNoenum"16:9""16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"Aspect ratio of the generated video.
resolutionNoenum"480p""480p", "720p"Resolution of the output video. Higher resolutions cost more per second.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image7JPG, PNG, WEBPReference image(s), up to 7.

Example Request

{
  "prompt": "A person from <IMAGE_0> running through a sunlit meadow, cinematic slow motion",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
}

Response

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-1-5' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-1-5_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.5 API Pricing

ResolutionPrice (USD)
480p / per second$0.08
720p / per second$0.14
1080p / per second$0.25
3. Grok Imagine Video 1.5 Turbo

Grok Imagine Video 1.5 Turbo API Documentation

https://gateway.pixazo.ai/grok-imagine-video-1-5-preview/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video 1.5 Image to Video Request - Grok Imagine Video 1.5 API

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-1-5-preview/v1/image-to-video HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "the camera slowly pushes in as the subject turns toward the light and smiles, cinematic",
  "image": {
    "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
  },
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-1-5-preview/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "the camera slowly pushes in as the subject turns toward the light and smiles, cinematic",
    "image": {"url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"},
    "duration": 6,
    "resolution": "720p",
    "aspect_ratio": "16:9"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/grok-imagine-video-1-5-preview/v1/image-to-video';
const headers = {
  'Content-Type': 'application/json',
  'Cache-Control': 'no-cache',
  'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
};
const data = {
  prompt: 'the camera slowly pushes in as the subject turns toward the light and smiles, cinematic',
  image: { url: 'https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png' },
  duration: 6,
  resolution: '720p',
  aspect_ratio: '16:9'
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-1-5-preview/v1/image-to-video" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "the camera slowly pushes in as the subject turns toward the light and smiles, cinematic",
    "image": { "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png" },
    "duration": 6,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'

Output

{
  "request_id": "grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5-preview",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5-preview",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video 1.5 Image to Video

Parameter Required Type Default Allowed values / range Description
imageYesobject—{ "url": "<https url or data: URI>" }Source image to animate (the starting frame). Pass it as image.url — a public HTTPS URL or a base64 data: URI. JPG, PNG or WebP.
promptYesstring—non-empty; ≤ 2000 charsDescribes the motion — how the source image should animate.
resolutionNostring—"480p", "720p"Output resolution. Billed per second by resolution (720p costs more than 480p). If omitted, the provider selects the resolution — set it explicitly for predictable cost.
durationNointeger81–15 (seconds)Length of the generated video in seconds. The provider applies its own default (8) when omitted. Billed per second — specify it explicitly for predictable cost.
aspect_ratioNostring—"1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"Output aspect ratio. If omitted, the provider selects it.
sizeNostring—"848x480", "1696x960", "1280x720", "1920x1080"Explicit output dimensions, as an alternative to resolution.
reference_imagesNoarray—up to 10 items, each { "url": "<https url>" }Additional reference images to guide style or subject consistency.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPInput image to animate.

Output: MP4 video delivered as an output.media_url on the Pixazo R2 CDN. Billed per second of video by the requested resolution.

Example Request

{
  "prompt": "the camera slowly pushes in as the subject turns toward the light and smiles, cinematic",
  "image": {
    "url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/f1.png"
  },
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

Response

{
  "request_id": "grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance. Required: $0.01"
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-1-5-preview' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-1-5-preview_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-1-5-preview",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-1-5-preview_019d42ce-ae71-7999-24c9-5d76447ecafb4"

Response (Completed)

{
  "request_id": "grok-imagine-video-1-5-preview_019d42ce-ae71-7999-24c9-5d76447ecafb4",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-1-5-preview",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-1-5-preview_019d42ce-ae71-7999-24c9-5d76447ecafb4/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-04-01T07:32:03.749Z",
  "updated_at": "2026-04-01T07:32:20.000Z",
  "completed_at": "2026-04-01T07:32:20.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type (video/mp4)
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.5 Turbo API Pricing

ResolutionPrice (USD)
480p (per second of video)$0.08
720p (per second of video)$0.14
4. Grok Imagine Video 1.0

Grok Imagine Video 1.0 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-text-to-video/v1/grok-imagine-video-text-to-video-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video (Text to Video) generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-text-to-video/v1/grok-imagine-video-text-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
  "duration": 6,
  "aspect_ratio": "16:9",
  "resolution": "720p"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-text-to-video/v1/grok-imagine-video-text-to-video-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
    "duration": 6,
    "aspect_ratio": "16:9",
    "resolution": "720p"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-text-to-video/v1/grok-imagine-video-text-to-video-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
  "duration": 6,
  "aspect_ratio": "16:9",
  "resolution": "720p"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-text-to-video/v1/grok-imagine-video-text-to-video-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
    "duration": 6,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'

Output

{
  "request_id": "grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-text-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-text-to-video",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video (Text to Video) generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text description of the desired video. Must be detailed and descriptive for best results.
durationNointeger61–15 (seconds)Duration of the generated video in seconds. Must be a whole number of seconds.
aspect_ratioNoenum"16:9""16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"Aspect ratio of the output video.
resolutionNoenum"720p""480p", "720p"Resolution of the output video.

Example Request

{
  "prompt": "Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines, vibrant colors",
  "duration": 6,
  "aspect_ratio": "16:9",
  "resolution": "720p"
}

Response

{
  "request_id": "grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-text-to-video' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-text-to-video",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-text-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-text-to-video",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-text-to-video_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.0 API Pricing

ResolutionPrice (USD)
480p / per second$0.05
720p / per second$0.07
Image to Video

Grok Imagine Video 1.0 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-image-to-video/v1/grok-imagine-video-image-to-video-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video (Image to Video) generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-image-to-video/v1/grok-imagine-video-image-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants, over-the-shoulder camera, dark fantasy aesthetic",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-image-to-video/v1/grok-imagine-video-image-to-video-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants, over-the-shoulder camera, dark fantasy aesthetic",
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-image-to-video/v1/grok-imagine-video-image-to-video-request";

const data = {
  prompt: "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants, over-the-shoulder camera, dark fantasy aesthetic",
  image_url: "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
};

fetch(url, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-image-to-video/v1/grok-imagine-video-image-to-video-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants, over-the-shoulder camera, dark fantasy aesthetic",
    "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  }'

Output

{
  "request_id": "grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-image-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-image-to-video",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video (Image to Video) generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text description of the desired motion or scene in the video. Be specific about camera movement, lighting, environment, and action (e.g., “over-the-shoulder camera, slow pan left, bioluminescent plants glowing”).
image_urlYesstring——The input image to animate. Must be a valid HTTP/HTTPS link to a JPEG, PNG, or WebP image.
durationNointeger61–15 (seconds)Duration of the generated video in seconds. Must be a whole number of seconds.
aspect_ratioNoenum"auto""auto", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"Aspect ratio of the output video.
resolutionNoenum"720p""480p", "720p"Resolution of the output video.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image1JPG, PNG, WEBPInput image to animate.

Example Request

{
  "prompt": "Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants, over-the-shoulder camera, dark fantasy aesthetic",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 6,
  "aspect_ratio": "auto",
  "resolution": "720p"
}

Response

{
  "request_id": "grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-image-to-video' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-image-to-video",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-image-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-image-to-video",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-image-to-video_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.0 API Pricing

ResolutionPrice (USD)
480p / per second$0.05
720p / per second$0.07
Video to Video (Video Editing)

Grok Imagine Video 1.0 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-edit-video/v1/grok-imagine-video-edit-video-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video (Edit Video) generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-edit-video/v1/grok-imagine-video-edit-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "Colorize the video",
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
  "resolution": "auto"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-edit-video/v1/grok-imagine-video-edit-video-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "Colorize the video",
    "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
    "resolution": "auto"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-edit-video/v1/grok-imagine-video-edit-video-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "Colorize the video",
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
  "resolution": "auto"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-edit-video/v1/grok-imagine-video-edit-video-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "Colorize the video",
    "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
    "resolution": "auto"
  }'

Output

{
  "request_id": "grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-edit-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-edit-video",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video (Edit Video) generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text description of the desired video edit. Must be detailed and specific for best results.
video_urlYesstring——Public HTTP/HTTPS URL of the input video to edit. The video is resized to a maximum area of 854x480 pixels and truncated to 8 seconds before editing.
resolutionNoenumautoauto, 480p, 720pTarget output resolution. When set to auto, the model selects the optimal resolution based on input and prompt.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
video1MP4, MOVSource video to edit.

Example Request

{
  "prompt": "Colorize the video",
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/video/input-17s.mp4",
  "resolution": "auto"
}

Response

{
  "request_id": "grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-edit-video' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-edit-video",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-edit-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-edit-video",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-edit-video_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.0 API Pricing

ResolutionPrice (USD)
480p / per second$0.06
720p / per second$0.08
Reference to Video (Ref Images to Video)

Grok Imagine Video 1.0 API Documentation

https://gateway.pixazo.ai/grok-imagine-video-reference-to-video/v1/grok-imagine-video-reference-to-video-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Grok Imagine Video (Reference to Video) generate request

Request Code

POST https://gateway.pixazo.ai/grok-imagine-video-reference-to-video/v1/grok-imagine-video-reference-to-video-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "A @Image1 running through a sunlit meadow, cinematic slow motion",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
}
import requests

url = "https://gateway.pixazo.ai/grok-imagine-video-reference-to-video/v1/grok-imagine-video-reference-to-video-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "A @Image1 running through a sunlit meadow, cinematic slow motion",
    "reference_image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    ],
    "duration": 8,
    "aspect_ratio": "16:9",
    "resolution": "480p"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/grok-imagine-video-reference-to-video/v1/grok-imagine-video-reference-to-video-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "A @Image1 running through a sunlit meadow, cinematic slow motion",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/grok-imagine-video-reference-to-video/v1/grok-imagine-video-reference-to-video-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "A @Image1 running through a sunlit meadow, cinematic slow motion",
    "reference_image_urls": [
        "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
    ],
    "duration": 8,
    "aspect_ratio": "16:9",
    "resolution": "480p"
}'

Output

{
  "request_id": "grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-reference-to-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-reference-to-video",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Grok Imagine Video (Reference to Video) generate request

Parameter Required Type Default Allowed values / range Description
promptYesstring——Text prompt describing the desired video. Use @Image1, @Image2, ..., @Image7 to reference the corresponding URLs in `reference_image_urls` in order. Example: "A @Image1 running through a sunlit meadow, cinematic slow motion".
reference_image_urlsYesstring[]——Array of one to seven public HTTP URLs to reference images. Each image is referenced in the prompt by @Image1, @Image2, etc., in the order provided. Maximum of 7 images allowed.
durationNointeger81–10 (seconds)Duration of the generated video in seconds. Must be a whole number of seconds.
aspect_ratioNoenum"16:9""16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16"Aspect ratio of the output video.
resolutionNoenum"480p""480p", "720p"Resolution of the output video.

Content Item Types & Limits

TypeMaxFormat / SizeDescription
image7JPG, PNG, WEBPReference image(s), up to 7.

Example Request

{
  "prompt": "A @Image1 running through a sunlit meadow, cinematic slow motion",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "480p"
}

Response

{
  "request_id": "grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_API_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'grok-imagine-video-reference-to-video' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "grok-imagine-video-reference-to-video",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "grok-imagine-video-reference-to-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "grok-imagine-video-reference-to-video",
  "error": null,
  "output": {
    "media_url": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/grok-imagine-video-reference-to-video_019dxxxx/output.mp4"],
    "media_type": "video/mp4"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstringWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Grok Imagine Video 1.0 API Pricing

ResolutionPrice (USD)
480p / per second$0.05
720p / per second$0.07

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
1,200last 30d
~40 per day
Success rate
100.0%
of completed generations
Generation time
2.1minavg
p95 115.5s
Requests
Sep 17max 400Oct 16
Grok Imagine Video 1.5 LiteAvg 17/day
Grok Imagine Video 1.0Avg 13/day
Grok Imagine Video 1.5Avg 10/day
Generation Time
Sep 17max 2.9minOct 16
Grok Imagine Video 1.5 LiteAvg 104.5s
Grok Imagine Video 1.0Avg 2.6min
Grok Imagine Video 1.5Avg 116.6s
Error Rate
Sep 17max 5.0%Oct 16
Grok Imagine Video 1.5 LiteAvg 0.0%
Grok Imagine Video 1.0Avg 0.0%
Grok Imagine Video 1.5Avg 0.0%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
100.00%
across all generations of this model family
Uptime
Sep 17max 100%Oct 16
Grok Imagine Video 1.5 LiteAvg 100.00%
Grok Imagine Video 1.0Avg 100.00%
Grok Imagine Video 1.5Avg 100.00%