Skip to content

Installation

Prerequisites

Before installing Direktor, ensure you have the following:

System Requirements

  • Python 3.11 or higher
  • FFmpeg - Required for audio/video processing

Installing FFmpeg

=== "Ubuntu/Debian"

sudo apt update
sudo apt install ffmpeg

=== "macOS"

brew install ffmpeg

=== "Windows" Download from ffmpeg.org and add to PATH

API Keys Required

You'll need API keys from the following services:

Service Purpose Get Key
OpenAI Text generation (GPT models) platform.openai.com
Replicate Audio, transcription, images replicate.com
Cloudflare R2 or S3 Audio file storage cloudflare.com

Installation Methods

uv add direktor

Using pip

pip install direktor

From Source (Development)

git clone https://github.com/Skelf-Research/direktor.git
cd direktor
uv sync --all-extras

Configuration

Create a .env file in your project directory:

# Required API Keys
REPLICATE_API_TOKEN=your_replicate_token
OPENAI_API_KEY=your_openai_key

# Model Configuration
DISTIL_MODEL=3ab86df6c8f54c11309d4d1f930ac292bad43ace52d10c80d87eb258b3c9f79c
BARK_MODEL=adirik/styletts2:989cb5ea6d2401314eb30685740cb9f6fd1c9001b8940659b406f952837ab5ac
FLUX_MODEL=black-forest-labs/flux-schnell:fe82ca7f3f7efe4ad452c49a31e20d18b31d498bddbc1d61860703e0339406ba
GPT4_MODEL=gpt-4-vision-preview
GPT4_MAX_TOKENS=8000

# Cloud Storage (Cloudflare R2 or S3-compatible)
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_ENDPOINT_URL=https://your-account.r2.cloudflarestorage.com
AWS_BUCKET_NAME=your_bucket_name

Verify Installation

# Check CLI installation
direktor --help

# Check Python import
python -c "import direktor; print(direktor.__version__)"

Next Steps