Settings

Configure your API keys and preferences.

TikTok

Connect your TikTok account to post videos directly from the library.

Connect TikTok Account

Setup required first

1. Go to developers.tiktok.com → your app

2. Add redirect URI: http://localhost:3000/api/tiktok/callback

3. Click “Connect TikTok Account” above

Anthropic API

Used for generating ideas, scripts, and captions.

Set via ANTHROPIC_API_KEY in your .env.local file.

Supabase

Database for saving content packages.

Set via NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY in your .env.local file.

ElevenLabs API

AI voice generation for TikTok voiceovers.

Find voice IDs in your ElevenLabs Voice Library.

Set via ELEVENLABS_API_KEY and ELEVENLABS_VOICE_ID in your .env.local file.

Runway ML

Primary AI Video

Generates AI video clips from your script using Gen-3 Alpha Turbo. When configured, replaces Pexels b-roll with fully AI-generated scenes matched to each part of the script.

Get your key at app.runwayml.com → API. Set RUNWAYML_API_SECRET in .env.local and restart the server.

Video generation tiers

1. Runway API key set → AI-generated clips per scene (~2-3 min)

2. Pexels API key set → relevant stock footage per scene (~45 sec)

3. Neither → animated gradient background

Pexels API for auto b-roll video

Free API that auto-fetches relevant background footage for your videos based on the script content.

Get a free key at pexels.com/api — then set PEXELS_API_KEY in your .env.local file. Without it, videos use a gradient background.

Supabase Storage

Required for storing voiceover audio files. Create a public bucket named voiceovers in your Supabase project under Storage.

1. Go to Supabase → Storage → New Bucket

2. Name it voiceovers, enable Public bucket

3. Click Create

Database Setup

Run this SQL in your Supabase SQL editor to create the required tables:

create table content_packages (
  id uuid default gen_random_uuid() primary key,
  niche text not null,
  title text not null,
  hook text not null,
  script text not null,
  caption text not null,
  hashtags text not null,
  audio_url text,
  video_url text,
  status text default 'saved',
  created_at timestamp with time zone default now()
);

create table tiktok_tokens (
  id uuid default gen_random_uuid() primary key,
  user_id text not null unique,
  access_token text not null,
  refresh_token text not null,
  open_id text not null,
  expires_at timestamp with time zone not null,
  created_at timestamp with time zone default now()
);

-- If upgrading content_packages, run:
-- alter table content_packages add column if not exists video_url text;