Skip to Content
System ReferenceEnvironment Variables

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.

VariableDescription
SUPABASE_URLYour Supabase project URL (e.g., https://xxx.supabase.co)
SUPABASE_SERVICE_KEYSupabase service role key (full access, server-side only)
OPENAI_API_KEYOpenAI API key for GPT-4o-mini, TTS, and Whisper
WORKER_API_KEYBearer token for authenticating pipeline API calls

YouTube Posting

Required only if you want to post videos to YouTube.

VariableDescription
YOUTUBE_CLIENT_IDGoogle OAuth 2.0 client ID
YOUTUBE_CLIENT_SECRETGoogle OAuth 2.0 client secret
YOUTUBE_REFRESH_TOKENLong-lived refresh token from OAuth consent flow

YouTube Data API

Required only for the trend analysis features (channel discovery and video ingestion).

VariableDefaultDescription
YOUTUBE_DATA_API_KEYAPI key for public YouTube data (channel/video lookups)
YOUTUBE_DAILY_QUOTA_LIMIT10000Daily quota budget (free tier is 10,000 units)

AI Analysis

Required only for trend analysis video classification.

VariableDescription
ANTHROPIC_API_KEYAnthropic API key for Claude (video content analysis)

Media Providers

Optional. Only needed if using slideshow backgrounds or background music.

VariableDescription
PEXELS_API_KEYPexels API key for stock photos (slideshow backgrounds). Free tier: 200 requests/hour
JAMENDO_CLIENT_IDJamendo API key for background music tracks
ELEVENLABS_API_KEYElevenLabs API key (reserved for future AI music generation)

Topic Sources

Optional. Only needed for specific source types.

VariableDescription
TMDB_API_KEYTMDB API key for movie/TV trending topics
REDDIT_CLIENT_IDReddit app credentials (optional — public API works without auth)
REDDIT_CLIENT_SECRETReddit app secret

Pipeline Defaults

Optional. These control default pipeline behavior and can be left at their defaults.

VariableDefaultDescription
LOG_LEVELINFOLogging verbosity: DEBUG, INFO, WARNING, ERROR
DEFAULT_VIDEO_DURATION30Target video duration in seconds
WORDS_PER_SECOND2.5Speaking pace for word count calculation
HOOKS_PER_TOPIC3Number of hook options to generate per topic

Dashboard Environment (dashboard/.env.local)

VariableDescription
NEXT_PUBLIC_SUPABASE_URLSupabase project URL (same value as the worker’s SUPABASE_URL)
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anon/public key (for client-side queries)
PIPELINE_WORKER_URLWorker base URL (e.g., https://autoshorts-worker.onrender.com)
PIPELINE_WORKER_API_KEYSame value as the worker’s WORKER_API_KEY (for proxied API calls)
YOUTUBE_CLIENT_IDGoogle OAuth client ID (same value as the worker’s YOUTUBE_CLIENT_ID)
YOUTUBE_CLIENT_SECRETGoogle OAuth client secret (same value as the worker’s YOUTUBE_CLIENT_SECRET)
NEXT_PUBLIC_APP_URLDashboard URL for OAuth redirect (e.g., https://wintermute-sigma.vercel.app)

Where to Get API Keys

ServiceWhere to Get It
Supabasesupabase.com/dashboard  — Project Settings, API section
OpenAIplatform.openai.com/api-keys 
YouTube OAuthconsole.cloud.google.com  — APIs and Services, Credentials
YouTube Data APISame Google Cloud Console — Enable YouTube Data API v3, then create an API Key
Anthropicconsole.anthropic.com  — API Keys
Pexelspexels.com/api  — Free, instant approval
TMDBthemoviedb.org/settings/api  — Free
Jamendodeveloper.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
Last updated on