Create viral TikTok & YouTube videos with AI. No camera, no editing, just results.
- 🎯 AI Script Writing - Hook-driven scripts optimized for engagement (GPT-4o-mini)
- 🎨 AI Image Generation - Stunning visuals with Flux Schnell (9:16 vertical)
- 🎙️ AI Voiceover - Natural-sounding voices with OpenAI TTS (6 voices)
- 🎬 Auto Video Assembly - FFmpeg-based stitching with captions
- ⚡ Fast - From idea to video in under 2 minutes
- Frontend: Next.js 14 (App Router), React, Tailwind CSS
- AI Models: OpenAI GPT-4o-mini + TTS, Replicate Flux Schnell
- Video: FFmpeg for assembly, ASS subtitles for captions
- State: In-memory (swap for Redis/DB in production)
git clone <repo>
cd storyshort-clone
npm installcp .env.local.example .env.localEdit .env.local and add your API keys:
OPENAI_API_KEY=sk-...
REPLICATE_API_TOKEN=r8_...Don't have API keys? The app works in demo mode with mock data!
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# Windows (via chocolatey)
choco install ffmpegnpm run devOpen http://localhost:3000 🚀
- Enter topic → "The mysterious disappearance of the Mayan civilization"
- Pick style → Documentary, Horror, Anime, Fantasy, etc.
- Choose voice → Alloy, Nova, Onyx, Echo, Fable, Shimmer
- Generate → AI writes script, generates images, records voiceover
- Download → Get your finished MP4 video with captions!
Start video generation:
{
"topic": "5 psychological tricks stores use",
"style": "documentary",
"voice": "nova"
}Returns: { "projectId": "uuid" }
Poll generation progress:
{
"id": "uuid",
"status": "generating_images",
"progress": 45,
"scenes": [...],
"videoUrl": "/videos/video-123.mp4"
}Status values: pending → generating_script → generating_images → generating_audio → assembling → complete
| Voice | Description |
|---|---|
| alloy | Neutral, balanced |
| echo | Male, confident |
| fable | British accent |
| onyx | Deep, authoritative |
| nova | Female, warm |
| shimmer | Soft, gentle |
| Style | Visual Treatment |
|---|---|
| realistic | Photorealistic, cinematic lighting, 8K |
| anime | Studio Ghibli inspired, vibrant |
| horror | Dark, eerie, dramatic shadows |
| documentary | Realistic, historical accuracy |
| fantasy | Magical, ethereal lighting |
| minimalist | Clean, modern design |
npm run build
vercel --prodNote: FFmpeg isn't available on Vercel by default. For production, consider:
- Serverless FFmpeg layers
- External video APIs (Creatomate, Shotstack)
- Self-hosted on Railway/Render
FROM node:20-alpine
RUN apk add --no-cache ffmpeg
WORKDIR /app
COPY . .
RUN npm ci && npm run build
CMD ["npm", "start"]- AI script generation
- AI image generation
- AI voiceover
- FFmpeg video assembly
- Burn-in captions (ASS subtitles)
- Demo mode (mock data)
- Background music library
- Direct TikTok/YouTube upload
- User accounts & history
- Stripe payments
- Custom voice cloning
Estimated per video (5 scenes, 45 seconds):
- GPT-4o-mini: ~$0.001
- OpenAI TTS: ~$0.02
- Replicate Flux: ~$0.05 × 5 = $0.25
- Total: ~$0.27 per video
MIT