Workflow code
Copy this code to understand the workflow logic. Replace all API keys and credentials with your own before running.
// Faceless YouTube channel pipeline
// Step 1: Topic generation
// Claude generates 10 video ideas from trending topics
// Human picks one (or auto-picks top-scored idea)
// Step 2: Script writing (Node: Claude API)
const scriptPrompt = `Write a 5-minute YouTube script about: ${topic}
Format:
- Hook (0-5s): One shocking/surprising statement
- Problem (5-30s): Why this matters
- Main content (30s-4:30): 5 key points with examples
- CTA (4:30-5:00): Subscribe + comment prompt
Tone: Conversational, clear, Indian audience, no jargon`
// Step 3: Voiceover (Node: HTTP Request → Kokoro TTS API)
// POST to local Kokoro server or deployed instance
// Voice: af_heart (English) or hf_alpha (Hindi)
// Step 4: Thumbnail generation (Node: HTTP → Flux API or Stability API)
const thumbPrompt = `YouTube thumbnail: ${topic} title text, bold, high contrast, professional`
// Step 5: Video assembly (Node: Execute Command)
// ffmpeg to combine:
// - Background video (royalty-free from Pexels API)
// - Voiceover audio (from Step 3)
// - Auto-subtitles (Whisper from voiceover)
// Step 6: YouTube upload (Node: YouTube API)
// Title, description, tags, thumbnail — all AI generated
// Scheduled publish time: Tuesday 2pm IST