download_video
Download a completed video to disk after generation. Provide video ID and optional filename to save the video, thumbnail, or spritesheet locally.
Instructions
Download a completed video to disk.
IMPORTANT: Only call this AFTER get_video_status shows status='completed'. If the video is not completed, this will fail.
The video is automatically saved to the directory configured in VIDEO_PATH. Returns the filename of the downloaded file.
Parameters:
video_id: The ID from create_video or remix_video (required)
filename: Custom filename (optional, defaults to video_id with appropriate extension)
variant: What to download (default: "video")
"video" -> MP4 video file
"thumbnail" -> WEBP thumbnail image
"spritesheet" -> JPG spritesheet of frames
Typical workflow:
Create: create_video() -> video_id
Poll: get_video_status(video_id) until status='completed'
Download: download_video(video_id, filename="my_video.mp4") -> returns filename
Returns DownloadResult with: filename, variant
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variant | No | video | |
| filename | No | ||
| video_id | Yes |