🎬 Generate videos from text prompts using the LTX API.
- ✅ Simple command-line interface
- ✅ Text-to-video generation
- ✅ Configurable duration and resolution
- ✅ Automatic API key management
- ✅ Multiple output formats
pip install ltx-cliOr install from source:
git clone https://github.com/yazelin/ltx-cli.git
cd ltx-cli
pip install -e .-
Get your API key from LTX Console
-
Configure API key:
mkdir -p ~/.config/ltx-desktop
echo "YOUR_API_KEY" > ~/.config/ltx-desktop/api-key.txt
chmod 600 ~/.config/ltx-desktop/api-key.txt- Generate your first video:
ltx-cli --prompt "A cute orange cat yawning in sunlight" --output cat.mp4ltx-cli --prompt "Sunset over the ocean" --output sunset.mp4ltx-cli --prompt "A golden retriever running" \
--duration 8 \
--resolution 1280x720 \
--output dog.mp4usage: ltx-cli [-h] --prompt PROMPT [--output OUTPUT] [--duration DURATION]
[--resolution RESOLUTION] [--api-key API_KEY]
options:
-h, --help show this help message and exit
--prompt, -p PROMPT Video description text
--output, -o OUTPUT Output file path (default: output.mp4)
--duration, -d DURATION
Video duration in seconds (default: 5)
--resolution, -r RESOLUTION
Video resolution (default: 1920x1080)
--api-key API_KEY LTX API key (reads from ~/.config/ltx-desktop/api-key.txt if not provided)
- Text encoding / prompt enhancement: FREE
- Video generation: PAID (requires API credits)
Check your usage at LTX Console
Official LTX API docs: https://docs.ltx.video/
- Python 3.7+
requestslibrary- LTX API key
MIT License - see LICENSE file for details
Pull requests are welcome! For major changes, please open an issue first.
Yaze Lin (@yazelin)