Skip to main content
POST
Grok Imagine Video Edit

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

xAI Grok Imagine video edit request. Output preserves the input video's duration and aspect ratio.

prompt
string
required

Text description of the edit to apply to the video

Minimum string length: 1
Example:

"Restyle the clip as a hand-drawn anime sequence"

video
string
required

Input video URL or base64 data URI

Minimum string length: 1
Example:

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

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.