extend_video
Extend an existing video by generating a continuation clip from a prompt. Specify the next action and duration (1-10 seconds) to append new content.
Instructions
Extend an existing video by generating continuation content using xAI Grok Imagine Video API. Provide a source video URL and a prompt describing what should happen next. The extension segment duration is 1-10 seconds (default 6).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to use (default: grok-imagine-video). grok-imagine-video-1.5 does not support extension and returns "Video extension is not supported for this model.". | |
| prompt | Yes | Description of what should happen next in the video | |
| duration | No | Duration of the extension segment in seconds (1-10, default: 6) | |
| video_url | No | URL of the source video to extend (public URL or base64 data URL, .mp4). Provide exactly one of video_url, video_path, or video_file_id. | |
| video_path | No | Local video file path (.mp4). Uploaded to the xAI Files API automatically. Provide exactly one of video_url, video_path, or video_file_id. | |
| output_path | No | Output file path (default: extended_video.mp4) | |
| video_file_id | No | File ID of the source video from the xAI Files API. Provide exactly one of video_url, video_path, or video_file_id. |