Skip to main content
POST

Headers

Authorization
string
required

Bearer API key, e.g. Bearer sk-....

Example:

"Bearer sk-..."

Body

application/json

Grok Imagine video create body (POST /v1/videos).

model
string
required

Video model id. Model ids from the Model Square. Common: grok-imagine-video-1.5-preview, grok-imagine-video; variants like grok-video-1.5-pro / grok-video-1.5-max may be available on your account.

Example:

"grok-imagine-video-1.5-preview"

prompt
string
required

Video prompt, up to ~4096 characters.

Maximum string length: 4096
Example:

"Rainy neon street at night, a vintage sports car driving on wet asphalt"

seconds
string

Target duration in seconds as a string (e.g. "6", "8"). Minimum 1. Alias: integer duration.

Example:

"8"

duration
integer

Integer form of seconds.

Required range: x >= 1
aspect_ratio
enum<string>

Aspect ratio presets or custom number:number.

Available options:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
2:1,
1:2,
19.5:9,
9:19.5,
20:9,
9:20
Example:

"16:9"

resolution
enum<string>

Output clarity: 480P / 720P (case-insensitive; 480 / 720 also ok).

Available options:
480P,
720P,
480,
720,
480p,
720p
Example:

"720P"

image
string

Single reference image (Data URI preferred, or HTTPS URL). Do not use with reference_images.

reference_images
string[]

Multiple reference images (Data URI or URL). Do not use with image.

images
string[]

Compatible array form for references.

Response

Task accepted.

id
string

Task id.

object
string
Example:

"video"

model
string
status
string

e.g. queued / in_progress / completed.

progress
integer
created_at
integer
seconds
string
size
string