Skip to main content
POST
Grok Imagine Edit Video
Edit source videos with xAI’s Grok Imagine Video model

Authorizations

Authorization
string
header
required

API Key for API endpoints

Body

prompt
string
required

Text description of the desired edit

video_url
string<uri>
required

URL of the input video to edit. The video will be resized to a maximum area of 854x480 pixels and truncated to 8 seconds.

resolution
enum<string>
default:auto

Resolution of the output video

Available options:
auto,
480p,
720p
n
integer
default:1

Number of results to generate (1-4)

Required range: 1 <= x <= 4

Response

Generation submission accepted

id
string
required

Generation id.

status
enum<string>
required

Queue status

Available options:
IN_QUEUE,
IN_PROGRESS,
COMPLETED,
FAILED,
CANCELED
input
Input · object
required

Normalized input payload for the generation task.

usage
object
required

Credit usage breakdown for the request

code
string

Machine-readable generation error code. Present when status is FAILED.

message
string

Sanitized human-readable failure message. Present when status is FAILED.