Installation
Install the LattifAI SDK with pip or uv
Installation
Requirements
- Python: 3.10 - 3.14
- Operating System: Linux, macOS, Windows
Install with pip
pip install lattifaiInstall with uv (Recommended)
uv is 10-100x faster than pip for package installation.
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create a new project with uv
uv init my-project
cd my-project
source .venv/bin/activate
# Install LattifAI
uv pip install lattifaiVerify Installation
# Check version
python -c "import lattifai; print(lattifai.__version__)"
# Or use CLI
lai --versionOptional Dependencies
Full Installation
For alignment with all features:
pip install lattifai[alignment]Transcription Support
To enable transcription models (Gemini, Parakeet, SenseVoice):
pip install lattifai[transcription]All Features
Install everything including YouTube support:
pip install lattifai[all]Development
For development and testing:
pip install lattifai[dev]GPU Acceleration
GPU support is automatic:
- NVIDIA CUDA: Detected automatically with PyTorch CUDA
- Apple Silicon MPS: Detected automatically, no extra installation needed
Environment Setup
After installation, set up your API key:
# Option 1: Environment variable
export LATTIFAI_API_KEY="lf_your_api_key_here"
# Option 2: .env file
echo "LATTIFAI_API_KEY=lf_your_api_key_here" >> .envSee Authentication for details on obtaining your API key.
Troubleshooting
FFmpeg Not Found
LattifAI requires FFmpeg for audio/video processing. Install it:
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# Windows (using Chocolatey)
choco install ffmpegPermission Errors
If you encounter permission errors on Linux/macOS:
pip install --user lattifaiConflict with Other Packages
Use a virtual environment to isolate dependencies:
python -m venv .venv
source .venv/bin/activate
pip install lattifai