Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

xAI Grok Imagine video extend request. duration controls the length of the appended segment, not the total video length.

prompt
string
required

Text description guiding the extended footage

Minimum string length: 1
Example:

"The camera continues forward into the tunnel"

video
string
required

Input video URL or base64 data URI

Minimum string length: 1
Example:

"https://example.com/input.mp4"

duration
integer
default:6

Length in seconds of the appended segment (not the total video length)

Required range: 2 <= x <= 10
Example:

8

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.