Skip to main content
POST
/
generation
/
xai
/
grok-imagine-video
/
extend-video
Grok Imagine Extend Video
curl --request POST \
  --url https://open.skills.video/api/v1/generation/xai/grok-imagine-video/extend-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "video_url": "<string>"
}
'
{
  "id": "gen_123",
  "status": "IN_QUEUE",
  "input": {
    "prompt": "a cat walking through neon rain",
    "duration": 5,
    "aspect_ratio": "16:9",
    "n": 1
  },
  "usage": {
    "total": 20,
    "subscription": 20,
    "permanent": 0
  }
}
Extend 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 what should happen next in the video

video_url
string<uri>
required

URL of the source video to extend. Must be MP4 format (H.264, H.265, or AV1 codec), 2-15 seconds long.

duration
integer
default:6

Length of the extension in seconds

Required range: 2 <= x <= 10
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.