Cheaper Gen.

Grok Imagine Video 1.5 API reference

Everything you need to call Grok Imagine Video 1.5 from your code. Base URL https://cheapergen.com/api/v1. Try it first in the playground.

Authentication

Create a key in Dashboard → API keys and send it as a bearer token. Keep keys server-side.

export CHEAPERGEN_API_KEY="cg_live_…"

# every request
Authorization: Bearer $CHEAPERGEN_API_KEY

Grok Imagine Video 1.5 Text to Video API

POST/api/v1/run/xai/grok-imagine-video/text-to-video

Submits an asynchronous job and returns 202 with a generation id. Poll GET /api/v1/generations/{id} or pass webhook_url. See job lifecycle.

Input parameters

NameTypeDescriptionAffects price
promptrequiredstringDescribe the shot: subject, action, camera movement, lighting and style.No
aspect_ratiostring (enum)Output frame shape.
Values: 16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 3:2 · 2:3
Default: 16:9
Yes
resolutionstring (enum)Output resolution. Higher resolutions cost more per second.
Values: 480p · 720p · 1080p
Default: 720p
Yes
durationintegerLength of the generated clip in seconds (1–15s). You pay per second.
Range: 1–15s
Default: 8
Yes
webhook_urlstring (URL)Optional. We POST the finished generation here, signed with your webhook secret. WebhooksNo

Request

curl -X POST https://cheapergen.com/api/v1/run/xai/grok-imagine-video/text-to-video \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "A corgi DJ in sunglasses spins records at a beach party at sunset, crowd cheering, upbeat house music",
  "aspect_ratio": "16:9",
  "resolution": "720p",
  "duration": 8
}'

Response

{
  "id": "gen_8c2QmX1nq0k4",
  "object": "generation",
  "model": "xai/grok-imagine-video",
  "endpoint": "xai/grok-imagine-video/text-to-video",
  "mode": "text-to-video",
  "status": "queued",
  "input": {
    "prompt": "A corgi DJ in sunglasses spins records at a beach party at sunset, crowd cheering, upbeat house music",
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration": 8
  },
  "output": null,
  "error": null,
  "cost": {
    "amount_usd": 0.2255,
    "currency": "usd",
    "estimated": true,
    "official_usd": null,
    "saved_usd": null
  },
  "source": "api",
  "started_at": null,
  "completed_at": null,
  "urls": {
    "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
    "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
  },
  "created_at": "2026-10-15T09:21:04Z"
}

Grok Imagine Video 1.5 Reference to Video API

POST/api/v1/run/xai/grok-imagine-video/reference-to-video

Submits an asynchronous job and returns 202 with a generation id. Poll GET /api/v1/generations/{id} or pass webhook_url. See job lifecycle.

Input parameters

NameTypeDescriptionAffects price
promptrequiredstringDescribe the shot: subject, action, camera movement, lighting and style.No
reference_image_urlsrequiredstring[] (URLs)Up to 7 images for characters, products, style or scene. Refer to them in the prompt as @Image1, @Image2…
Max items: 7
No
aspect_ratiostring (enum)Output frame shape.
Values: 16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 3:2 · 2:3
Default: 16:9
Yes
resolutionstring (enum)Output resolution. Higher resolutions cost more per second.
Values: 480p · 720p · 1080p
Default: 720p
Yes
durationintegerLength of the generated clip in seconds (1–15s). You pay per second.
Range: 1–15s
Default: 8
Yes
webhook_urlstring (URL)Optional. We POST the finished generation here, signed with your webhook secret. WebhooksNo

Request

curl -X POST https://cheapergen.com/api/v1/run/xai/grok-imagine-video/reference-to-video \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "@Image1 rides a bicycle through a field of sunflowers, wind in her hair, cheerful whistling",
  "reference_image_urls": [
    "https://cdn.cheapergen.ai/samples/reference-1.jpg"
  ],
  "aspect_ratio": "16:9",
  "resolution": "720p",
  "duration": 8
}'

Response

{
  "id": "gen_8c2QmX1nq0k4",
  "object": "generation",
  "model": "xai/grok-imagine-video",
  "endpoint": "xai/grok-imagine-video/reference-to-video",
  "mode": "reference-to-video",
  "status": "queued",
  "input": {
    "prompt": "@Image1 rides a bicycle through a field of sunflowers, wind in her hair, cheerful whistling",
    "reference_image_urls": [
      "https://cdn.cheapergen.ai/samples/reference-1.jpg"
    ],
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration": 8
  },
  "output": null,
  "error": null,
  "cost": {
    "amount_usd": 0.2255,
    "currency": "usd",
    "estimated": true,
    "official_usd": null,
    "saved_usd": null
  },
  "source": "api",
  "started_at": null,
  "completed_at": null,
  "urls": {
    "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
    "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
  },
  "created_at": "2026-10-15T09:21:04Z"
}

Get the result

Generations are asynchronous. Poll until status is succeeded, failed or canceled — or pass webhook_url when you submit. Failed generations are refunded automatically.

curl https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4 \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY"

More: job lifecycle · webhooks · errors

Grok Imagine Video 1.5 pricing

Pay per second of video. No subscription. Failed generations are refunded automatically.

TierOfficial priceCheaper Gen.
480p
audio included
$0.08/s$0.07/s
720p
audio included
$0.14/s$0.123/s
1080p
audio included
$0.25/s$0.22/s
  • Official price: xAI API list price for grok-imagine-video-1.5 ($0.08 / s at 480p, $0.14 at 720p, $0.25 at 1080p; $0.01 per input image). Prices verified 2026-10-16.
  • Each reference image adds $0.01 (before our discount).