Skip to main content
POST
xai generate video

Body

application/json
prompt
string
required

Video generated prompt words, currently only supporting English explanations

Minimum string length: 1
model
enum<string>
required

video model

Available options:
grok-imagine-video
duration
enum<string>
default:6

video duration

Available options:
6,
10,
12,
16,
20
aspectRatio
enum<string>

video aspectRatio

Available options:
2:3,
3:2,
1:1,
9:16,
16:9
resolution
enum<string>
default:720P

video resolution

Available options:
480P,
720P
images
string[]

Reference image URL (Image generated video, up to 5 images); After providing the video size following the image, aspect ratio and resolution will be ignored

Response

200 - */*

OK

Unified return structure for response results

code
integer<int32>

Response status code

Example:

200

message
string

Response message

data
object

Response result

traceId
string

Response traceId