Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

xAI Grok Imagine text-to-video request.

prompt
string
required

Text description of the video to generate

Minimum string length: 1
Example:

"A serene lake at sunrise with mist rolling over the water"

duration
integer
default:8

Video duration in seconds

Required range: 1 <= x <= 15
Example:

8

aspect_ratio
enum<string>
default:16:9

Video aspect ratio

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

"16:9"

resolution
enum<string>
default:480p

Video resolution

Available options:
480p,
720p
Example:

"720p"

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.