Environment Variables
All configuration is via environment variables loaded by the worker and dashboard. This page lists every variable, whether it is required, and where to get the credentials.
What It Does
Environment variables connect the system to external services (Supabase, OpenAI, YouTube, etc.) and control default behavior. The Worker and Dashboard each have their own set of variables stored in separate env files.
Worker Environment (worker/.env)
Required
These must be set for the worker to start and process content.
| Variable | Description |
|---|---|
SUPABASE_URL | Your Supabase project URL (e.g., https://xxx.supabase.co) |
SUPABASE_SERVICE_KEY | Supabase service role key (full access, server-side only) |
OPENAI_API_KEY | OpenAI API key for GPT-4o-mini, TTS, and Whisper |
WORKER_API_KEY | Bearer token for authenticating pipeline API calls |
YouTube Posting
Required only if you want to post videos to YouTube.
| Variable | Description |
|---|---|
YOUTUBE_CLIENT_ID | Google OAuth 2.0 client ID |
YOUTUBE_CLIENT_SECRET | Google OAuth 2.0 client secret |
YOUTUBE_REFRESH_TOKEN | Long-lived refresh token from OAuth consent flow |
YouTube Data API
Required only for the trend analysis features (channel discovery and video ingestion).
| Variable | Default | Description |
|---|---|---|
YOUTUBE_DATA_API_KEY | — | API key for public YouTube data (channel/video lookups) |
YOUTUBE_DAILY_QUOTA_LIMIT | 10000 | Daily quota budget (free tier is 10,000 units) |
AI Analysis
Required only for trend analysis video classification.
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Anthropic API key for Claude (video content analysis) |
Media Providers
Optional. Only needed if using slideshow backgrounds or background music.
| Variable | Description |
|---|---|
PEXELS_API_KEY | Pexels API key for stock photos (slideshow backgrounds). Free tier: 200 requests/hour |
JAMENDO_CLIENT_ID | Jamendo API key for background music tracks |
ELEVENLABS_API_KEY | ElevenLabs API key (reserved for future AI music generation) |
Topic Sources
Optional. Only needed for specific source types.
| Variable | Description |
|---|---|
TMDB_API_KEY | TMDB API key for movie/TV trending topics |
REDDIT_CLIENT_ID | Reddit app credentials (optional — public API works without auth) |
REDDIT_CLIENT_SECRET | Reddit app secret |
Pipeline Defaults
Optional. These control default pipeline behavior and can be left at their defaults.
| Variable | Default | Description |
|---|---|---|
LOG_LEVEL | INFO | Logging verbosity: DEBUG, INFO, WARNING, ERROR |
DEFAULT_VIDEO_DURATION | 30 | Target video duration in seconds |
WORDS_PER_SECOND | 2.5 | Speaking pace for word count calculation |
HOOKS_PER_TOPIC | 3 | Number of hook options to generate per topic |
Dashboard Environment (dashboard/.env.local)
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase project URL (same value as the worker’s SUPABASE_URL) |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase anon/public key (for client-side queries) |
PIPELINE_WORKER_URL | Worker base URL (e.g., https://autoshorts-worker.onrender.com) |
PIPELINE_WORKER_API_KEY | Same value as the worker’s WORKER_API_KEY (for proxied API calls) |
YOUTUBE_CLIENT_ID | Google OAuth client ID (same value as the worker’s YOUTUBE_CLIENT_ID) |
YOUTUBE_CLIENT_SECRET | Google OAuth client secret (same value as the worker’s YOUTUBE_CLIENT_SECRET) |
NEXT_PUBLIC_APP_URL | Dashboard URL for OAuth redirect (e.g., https://wintermute-sigma.vercel.app) |
Where to Get API Keys
| Service | Where to Get It |
|---|---|
| Supabase | supabase.com/dashboard — Project Settings, API section |
| OpenAI | platform.openai.com/api-keys |
| YouTube OAuth | console.cloud.google.com — APIs and Services, Credentials |
| YouTube Data API | Same Google Cloud Console — Enable YouTube Data API v3, then create an API Key |
| Anthropic | console.anthropic.com — API Keys |
| Pexels | pexels.com/api — Free, instant approval |
| TMDB | themoviedb.org/settings/api — Free |
| Jamendo | developer.jamendo.com — Free tier available |
How It Works
Worker: Variables are loaded from worker/.env by the Python application at startup. In production (Render), they are set in the Render dashboard environment settings.
Dashboard: Variables in dashboard/.env.local are loaded by Next.js. Variables prefixed with NEXT_PUBLIC_ are available in the browser. Variables without that prefix are server-side only (used in API routes).
Where to Find It
- Worker env file:
worker/.env(local development) - Dashboard env file:
dashboard/.env.local(local development) - Production (Worker): Render dashboard, Environment tab
- Production (Dashboard): Vercel dashboard, Environment Variables section