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.
Models Version
Get 10% Cashback on Your First Payment (up to $500)
Add funds and get 10% cashback on your first payment (up to $500).
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-videoAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | 1–4,096 characters | What the video shows: subject, action, setting, camera movement, lighting and mood. |
duration | No | integer | 6 | 1–15 (whole seconds) | Length of the video in seconds. This is the length that is billed. A number, not a string. |
resolution | No | string | "720p" | 480p, 720p, 1080p | Output resolution. It sets the rate billed per second. Values are case-sensitive. |
aspect_ratio | No | string | "16:9" | 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16 | Frame 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_urlsandimageare rejected here. - Each request returns one video.
num_images,batch_size,number_of_images,n,countare rejected — send one request per video. - Set the length with
durationonly, in whole seconds from 1 to 15.seconds,num_frames,frames_per_second,music_length_msare rejected. - Send every field at the top level of the JSON body, with the text in
prompt;parameters,content,textare rejected. - Values are case-sensitive: use
720p, not720P. - When you leave a field out, the defaults apply: 6 seconds and
720p, in16:9. Setdurationandresolutionexplicitly for a predictable length and rate. - There is no
seedparameter. - Omit optional fields you do not use — do not send them as
null. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_urlandwebhook_modein 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.
| Resolution | Notes |
|---|---|
480p | Lowest resolution |
720p | The default |
1080p | Highest 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid 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. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, or a prompt longer than 4,096 characters | synchronous 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 policy | status: "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_KEYcURL 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — grok-imagine-video-1-5-lite for this endpoint. |
| output.media_url | array of strings | URL of the generated video (one MP4 file per request). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/text-to-video. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.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.
| Resolution | Price (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 |
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-videoAuthentication
All requests require an API key passed via header.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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.
| Header | Required | Description |
|---|---|---|
| X-Webhook-URL | To enable | HTTPS URL to receive the Webhook callback. |
| X-Webhook-Mode | No | terminal (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
200within a few seconds; the Webhook endpoint must be HTTPS.
Request Parameters
| Parameter | Required | Type | Default | Allowed values / range | Description |
|---|---|---|---|---|---|
prompt | Yes | string | — | 1–4,096 characters | The motion or change you want: what moves, how the camera moves, the mood. Required here too. |
image_url | Yes | string | — | One JPEG, PNG or WebP image: a publicly reachable https URL or a data URI | The source image to animate. The video takes its shape from this image. |
duration | No | integer | 6 | 1–15 (whole seconds) | Length of the video in seconds. This is the length that is billed. A number, not a string. |
resolution | No | string | "720p" | 480p, 720p, 1080p | Output resolution. It sets the rate billed per second. Values are case-sensitive. |
Good to know
- Send exactly one image as
image_url;image_urlsandimageare rejected. aspect_ratiois 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,countare rejected — send one request per video. - Set the length with
durationonly, in whole seconds from 1 to 15.seconds,num_frames,frames_per_second,music_length_msare rejected. - Send every field at the top level of the JSON body, with the text in
prompt;parameters,content,textare rejected. - Values are case-sensitive: use
720p, not720P. - When you leave a field out, the defaults apply: 6 seconds and
720p. Setdurationandresolutionexplicitly for a predictable length and rate. - There is no
seedparameter. - Omit optional fields you do not use — do not send them as
null. - Webhooks are set with the
X-Webhook-URL/X-Webhook-Modeheaders;webhook_urlandwebhook_modein 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.
| Resolution | Notes |
|---|---|
480p | Lowest resolution |
720p | The default |
1080p | Highest 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 reachablehttpsURL, or a data URI such asdata: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_ratioparameter 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
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
| Ocp-Apim-Subscription-Key | Yes | Your API subscription key. |
| X-Webhook-URL | No | Enable Webhook callbacks (see Webhook section). |
| X-Webhook-Mode | No | terminal (default) or sync (see Webhook section). |
Response Handling
| Status Code | Meaning |
|---|---|
| 202 | Accepted — request queued; returns request_id and polling_url. |
| 400 | Invalid 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. |
| 401 | Unauthorized — missing or invalid subscription key. |
| 402 | Insufficient balance for the hold this request needs. |
| 429 | Too many requests. |
| 500 | Internal 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.
| Condition | How it surfaces |
|---|---|
| Missing or invalid subscription key | synchronous 401 |
| Balance too low for the hold | synchronous 402 |
Missing or empty prompt, or a prompt longer than 4,096 characters | synchronous 400 |
Missing or empty image_url, or image_url sent as anything other than a single string | synchronous 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 image | status: "ERROR" |
| A prompt or image the provider refuses, for example under its content policy | status: "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_KEYcURL 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier. |
| status | string | QUEUED, PROCESSING, COMPLETED or ERROR. |
| model_id | string | The model that handled the request — grok-imagine-video-1-5-lite for this endpoint. |
| output.media_url | array of strings | URL of the generated video (one MP4 file per request). |
| output.media_type | string | video/mp4. |
| created_at | string | Request creation timestamp. |
| completed_at | string | Completion timestamp. |
| error | string | Error message when status is ERROR. |
| polling_url | string | Status URL for this request (submit response only). |
Status Values & Flow
QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).
Typical workflow
- Send the request to
POST https://gateway.pixazo.ai/grok-imagine-video-1-5-lite/v1/image-to-video. - Save the
request_idfrom the202response. - Poll
GET /v2/requests/status/{request_id}every 10 seconds or so, or use a Webhook instead. - When
statusisCOMPLETED, download the video fromoutput.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.
| Resolution | Price (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 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
prompt | Yes | string | — | — | Text description of the desired video. |
duration | No | integer | 6 | 1–15 (seconds) | Video duration in seconds. |
aspect_ratio | No | enum | "16:9" | "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16" | Aspect ratio of the generated video. |
resolution | No | enum | "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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.5 API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p / per second | $0.08 |
| 720p / per second | $0.14 |
| 1080p / per second | $0.25 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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 |
|---|---|---|---|---|---|
prompt | Yes | string | — | ≤ 4096 characters | Text description of the desired changes or motion in the video. |
image_url | Yes | string | — | jpg, jpeg, png, webp, gif, avif | Publicly reachable URL of the input image to animate. |
duration | No | integer | 6 | 1–15 (seconds) | Video duration in seconds. |
resolution | No | enum | "720p" | "480p", "720p", "1080p" | Resolution of the output video. Higher resolutions cost more per second. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Input 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.5 API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p / per second | $0.08 |
| 720p / per second | $0.14 |
| 1080p / per second | $0.25 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
prompt | Yes | string | — | 1–4096 characters | Text prompt describing the video. Refer to the reference images in the prompt as <IMAGE_0>, <IMAGE_1> and so on. |
reference_image_urls | Yes | array of string | — | 1–7 URLs | One 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. |
duration | No | integer | 8 | 1–15 (seconds) | Video duration in seconds. |
aspect_ratio | No | enum | "16:9" | "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16" | Aspect ratio of the generated video. |
resolution | No | enum | "480p" | "480p", "720p" | Resolution of the output video. Higher resolutions cost more per second. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 7 | JPG, PNG, WEBP | Reference 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.5 API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p / per second | $0.08 |
| 720p / per second | $0.14 |
| 1080p / per second | $0.25 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
image | Yes | object | — | { "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. |
prompt | Yes | string | — | non-empty; ≤ 2000 chars | Describes the motion — how the source image should animate. |
resolution | No | string | — | "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. |
duration | No | integer | 8 | 1–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_ratio | No | string | — | "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3" | Output aspect ratio. If omitted, the provider selects it. |
size | No | string | — | "848x480", "1696x960", "1280x720", "1920x1080" | Explicit output dimensions, as an alternative to resolution. |
reference_images | No | array | — | up to 10 items, each { "url": "<https url>" } | Additional reference images to guide style or subject consistency. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Input 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_SUBSCRIPTION_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type (video/mp4) |
| created_at | string | When request was created |
| completed_at | string|null | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.5 Turbo API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p (per second of video) | $0.08 |
| 720p (per second of video) | $0.14 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description of the desired video. Must be detailed and descriptive for best results. |
| duration | No | integer | 6 | 1–15 (seconds) | Duration of the generated video in seconds. Must be a whole number of seconds. |
| aspect_ratio | No | enum | "16:9" | "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16" | Aspect ratio of the output video. |
| resolution | No | enum | "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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.0 API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p / per second | $0.05 |
| 720p / per second | $0.07 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | 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_url | Yes | string | — | — | The input image to animate. Must be a valid HTTP/HTTPS link to a JPEG, PNG, or WebP image. |
| duration | No | integer | 6 | 1–15 (seconds) | Duration of the generated video in seconds. Must be a whole number of seconds. |
| aspect_ratio | No | enum | "auto" | "auto", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16" | Aspect ratio of the output video. |
| resolution | No | enum | "720p" | "480p", "720p" | Resolution of the output video. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 1 | JPG, PNG, WEBP | Input 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.0 API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p / per second | $0.05 |
| 720p / per second | $0.07 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | Text description of the desired video edit. Must be detailed and specific for best results. |
| video_url | Yes | string | — | — | 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. |
| resolution | No | enum | auto | auto, 480p, 720p | Target output resolution. When set to auto, the model selects the optimal resolution based on input and prompt. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| video | 1 | MP4, MOV | Source 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.0 API Pricing
| Resolution | Price (USD) |
|---|---|
| 480p / per second | $0.06 |
| 720p / per second | $0.08 |
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.
| Header | Type | Required | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | string | Yes | Your 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
| Header | Required | Default | Description |
|---|---|---|---|
X-Webhook-URL | Yes (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-Mode | No | terminal | terminal — 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
POSTwhen the request reaches a terminal status. No callback duringPROCESSING. - sync mode —
POSTon every status poll (with delay capped at ~15s) plus a finalPOSTat terminal status. Use when you want progress updates. - Idempotency — use
request_idas your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates. - Response — respond
200 OKwithin 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 |
|---|---|---|---|---|---|
| prompt | Yes | string | — | — | 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_urls | Yes | string[] | — | — | 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. |
| duration | No | integer | 8 | 1–10 (seconds) | Duration of the generated video in seconds. Must be a whole number of seconds. |
| aspect_ratio | No | enum | "16:9" | "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16" | Aspect ratio of the output video. |
| resolution | No | enum | "480p" | "480p", "720p" | Resolution of the output video. |
Content Item Types & Limits
| Type | Max | Format / Size | Description |
|---|---|---|---|
| image | 7 | JPG, PNG, WEBP | Reference 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-Type | application/json |
| Cache-Control | no-cache |
| Ocp-Apim-Subscription-Key | YOUR_API_KEY |
Response Handling
Common status codes.
| Code | Meaning |
|---|---|
| 202 | Accepted — Request queued |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Insufficient Balance |
| 403 | Forbidden |
| 429 | Too Many Requests |
| 500 | Internal 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
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique request identifier |
| status | string | QUEUED, PROCESSING, COMPLETED, FAILED, or ERROR |
| model_id | string | Model that processed the request |
| error | string|null | Error message if failed |
| output.media_url | array | URLs to generated media (R2 CDN) |
| output.media_type | string | MIME type of the output |
| created_at | string | When request was created |
| completed_at | string | When request completed |
| polling_url | string | Status URL (initial response only) |
Status Values
| Status | Description |
|---|---|
| QUEUED | Request accepted, waiting to be processed |
| PROCESSING | Being processed by the model |
| COMPLETED | Done — output contains the result |
| FAILED | Failed — check error field |
| ERROR | System error — not charged |
Status Flow
QUEUED → PROCESSING → COMPLETED
→ FAILED
→ ERROR
Typical Workflow
- Send a generate request to the API endpoint
- Save the
request_idfrom the response - Poll every 5-10 seconds:
GET /v2/requests/status/{request_id} - When
statusis"COMPLETED", download fromoutput.media_url
Tip: Use X-Webhook-URL header to get a callback instead of polling.
Grok Imagine Video 1.0 API Pricing
| Resolution | Price (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).
〰 Uptime
Percent of generations that succeeded over the selected period, per model version.