video-gen
Video Generator
Generate videos via Maxgent FAL API proxy. Supports text-to-video, image-to-video, and first/last frame mode.
Prerequisites
MAX_API_KEYenvironment variable (auto-injected by Max)- Python 3.10+ (supports
uv runorpython3)
Routing
- Default auto-routing (high quality)
- Text-to-video:
fal-ai/veo3.1 - Image-to-video:
fal-ai/sora-2/image-to-video/pro
- Text-to-video:
- Optional explicit models
veo-3.1sora-2-prokling-v3-prokling-v3-standard
First/last frame default routing:
fal-ai/veo3.1/first-last-frame-to-video- With
--fast-first-last:fal-ai/veo3.1/fast/first-last-frame-to-video
Usage
uv run skills/video-gen/video-gen.py \
--model MODEL --prompt "PROMPT" --size SIZE --seconds N \
--output-dir DIR \
[--start-image PATH] [--end-image PATH] \
[--frame-mode auto|start|start-end] [--fast-first-last] \
[--generate-audio true|false] [--enhance-prompt true|false] \
[--negative-prompt TEXT] [--cfg-scale N]
Parameters:
--model:auto(recommended),veo-3.1,sora-2-pro,kling-v3-pro,kling-v3-standard--prompt: video description--size:720P,1080P,1280x720,720x1280--seconds: duration, e.g.8or8s--output-dir: output directory — default to$MAX_PROJECT_PATH(the user's project root)--start-image: start frame image path or URL (for image-to-video)--end-image: end frame image path or URL (for first/last frame mode)--frame-mode:auto(default),start,start-end--fast-first-last: use Veo fast first/last frame route--generate-audio: enable audio generation (defaulttrue)--enhance-prompt: enable prompt enhancement (defaulttrue)--negative-prompt: negative prompt (Kling only)--cfg-scale: CFG scale (Kling only)
Examples
# Text-to-video (default routing)
uv run skills/video-gen/video-gen.py --model auto --prompt "a golden retriever running on the beach, camera follows" --size 720P --seconds 8 --output-dir "$MAX_PROJECT_PATH"
# Image-to-video (Sora Pro)
uv run skills/video-gen/video-gen.py --model sora-2-pro --prompt "make the person smile and wave" --size 1280x720 --seconds 8 --output-dir "$MAX_PROJECT_PATH" --start-image "/path/to/start.jpg"
# First/last frame (Veo)
uv run skills/video-gen/video-gen.py --model auto --prompt "smooth transition from winter to spring" --size 1080P --seconds 8 --output-dir "$MAX_PROJECT_PATH" \
--start-image "/path/to/start.jpg" \
--end-image "/path/to/end.jpg" \
--frame-mode start-end
Instructions
- Check
MAX_API_KEY. - Use AskUserQuestion to collect: prompt, duration, resolution, first/last frame option, quality tier. Default output path to
$MAX_PROJECT_PATH. - For local images, the script auto-uploads via proxy to get an accessible URL.
- Wait for queue completion and download the output mp4.
- On success, report the saved path.
- On failure:
- HTTP 402 (insufficient credits): Stop immediately. Do NOT retry. Tell the user their API credits are exhausted.
- Other errors: retry once with a different model or adjusted parameters. If it fails again, stop and report the error.
More from maxgent-ai/maxgent-plugin
audio-transcribe
Speech-to-text transcription using Whisper with word-level timestamps. Use when users ask to transcribe audio or video to text, generate subtitles, or recognize speech.
51memory
Read long-term memory files to get historical context, code references, and error fix records. Use when user wants to read memory, get context, check history, avoid repeating errors.
12image-gen
AI image generation and editing. Use when users ask to generate, create, or draw images with AI, or edit and modify existing images.
6browser
Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.
5media-understand
AI-powered media understanding and analysis for images, videos, and audio. Use when users ask to describe, analyze, summarize, or extract text (OCR) from media files.
5media-processing
Process audio and video files with ffmpeg — trim, merge, extract audio, convert formats, compress, and more.
3