Skip to content

Grok Imagine Video

Submit a JSON video generation task with .

http
POST /v1/videos

Available models

Headers

NameTypeRequiredDescription
stringYesRequest authentication. Use a Bearer Token, for example: .
stringYesRequest content type. Must be set to .

Request body

NameTypeRequiredDescription
stringYesModel name. See Available models above.
stringYesVideo generation prompt. Max characters.
stringNoTarget duration in seconds. Minimum ; prefer a string, for example .
stringNoAspect ratio. Supports common presets ,,,,,,,,,,,,, and custom ratios.
stringNoOutput resolution. Supports and ; also accepts and .
stringNoSingle reference image as a data URI such as .
array<string>NoMultiple reference images. Array items use data URIs such as . Do not send at the same time when using multiple images.

Request example

bash
curl -X POST https://octopusx.ai/v1/videos \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '
{
  "model": "grok-imagine-video",
  "prompt": "A quiet city street at dawn, sunlight through leaves, camera slowly moving forward",
  "seconds": "8",
  "aspect_ratio": "16:9",
  "resolution": "720P"
}'
bash
curl -X POST https://octopusx.ai/v1/videos \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '
{
  "model": "grok-imagine-video",
  "prompt": "Let the person in the reference image turn naturally, keep a soft depth of field in the background",
  "seconds": "6",
  "aspect_ratio": "9:16",
  "resolution": "720P",
  "image": "data:image/png;base64,BASE64_IMAGE_DATA"
}'
bash
curl -X POST https://octopusx.ai/v1/videos \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '
{
  "model": "grok-imagine-video",
  "prompt": "Use subject features from multiple images to generate a coherent product showcase video",
  "seconds": "10",
  "aspect_ratio": "16:9",
  "resolution": "720P",
  "images": [
    "data:image/png;base64,FIRST_IMAGE_BASE64",
    "data:image/png;base64,SECOND_IMAGE_BASE64"
  ]
}'

Response example

json
{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-imagine-video",
  "status": "queued",
  "progress": 0,
  "created_at": 1735689600,
  "seconds": "6",
  "size": "720P",
  "video_url": ""
}

Response fields

NameTypeDescription
stringTask ID. Use it to query the task later.
stringObject type, usually .
stringModel name actually submitted.
stringTask status. Common values: ,,,,.
integerTask progress percentage.
stringVideo URL when the task completes. You can also download the result directly.