AI-powered short drama generator with dual production modes.
Input a one-sentence idea, get a complete short drama: world bible, character profiles, episode screenplays, and full-length MP4 videos.
- Deep Research — automatically researches genre trends, audience profiles, and platform conventions before writing
- Complete text package — world bible, character profiles, full episode outline, per-episode screenplays (DOCX)
- Two production modes:
- Mode B (Asset Assembly) — zero video API cost; composes character sprite images + backgrounds via FFmpeg with Ken Burns effects, TTS voiceover, subtitles, and BGM
- Mode A (AI Generation) — calls image generation + Kling/Hailuo video APIs for cinematic quality
- Multi-episode batch production — parallel Celery workers; each episode is an independent task with retry support
- Smart duration control — supports 90s / 5-min / 10-min episodes; LLM dialogue count auto-derived from target duration
- Cost estimation gate — Mode A shows API call count and estimated cost before starting production
- Modern web UI — React dashboard with episode progress board, document viewer, asset library, and video preview
- Python 3.11+, Node.js 18+, Redis, FFmpeg
git clone https://github.com/your-username/dramaker
cd dramaker
cp .env.example .env # fill in your API keys
pip install -r requirements.txt# Terminal 1: API server
uvicorn src.main:app --reload
# Terminal 2: Celery worker
celery -A src.worker worker --concurrency=4
# Terminal 3: Frontend
cd frontend && npm install && npm run devcp .env.example .env # fill in your API keys
docker compose up -dZero video API cost. Uses pre-built character sprite packs with multiple expressions:
src/assets/characters/
├── 小美/
│ ├── neutral.png
│ ├── happy.png
│ ├── sad.png
│ ├── angry.png
│ ├── surprised.png
│ └── thinking.png
src/assets/backgrounds/
src/assets/bgm/
Tip: Generate character sprites once with Mode A, save to asset library, then use Mode B for unlimited episodes at zero additional cost.
Calls image generation + video generation APIs per scene. Requires video API keys.
Cost estimate is shown before production starts:
- 5-min episode × 30 episodes ≈ 2250 API calls ≈ $225–$450
| Duration | Scenes | Lines/Episode | Mode A Cost/Episode |
|---|---|---|---|
| 90s | 2–4 | ~22 | ~$3–4 |
| 5 min | 5–8 | ~75 | ~$11 |
| 10 min | 8–15 | ~150 | ~$22 |
Full REST API at http://localhost:8000/docs (auto-generated Swagger UI).
Key endpoints:
POST /api/dramas— create new dramaPOST /api/dramas/{id}/research— trigger deep researchPOST /api/dramas/{id}/worldbuild— build world bible + charactersPOST /api/dramas/{id}/scripts— generate all episode scriptsPOST /api/dramas/{id}/produce— start video productionPOST /api/dramas/{id}/estimate— get Mode A cost estimateWS /ws/dramas/{id}/progress— real-time progress stream
See .env.example for all options. Key settings:
LLM_API_BASE=https://api.openai.com/v1
LLM_API_KEY=sk-...
LLM_MODEL=gpt-4o
VIDEO_BACKEND=kling # kling | hailuo | wan21
KLING_API_KEY=...
TTS_BACKEND=fish_speech # fish_speech | elevenlabs
FISH_SPEECH_API_BASE=http://localhost:8080MIT — free for commercial use.