Own Your Video Generation Stack - MediaRouter is the only 100% open source video generation gateway that gives you:
- 🔓 No Vendor Lock-in: Switch between Sora, Runway, Kling, and more with a single API
- 🔑 Bring Your Own Keys: Your API keys, your data, your control
- 💰 Cost Transparency: Real-time cost tracking across all providers
- 🏠 Run Anywhere: Docker-based deployment in 30 seconds
- 🛠️ Fully Customizable: Add your own providers, modify workflows, extend functionality
🎉 Latest: OpenAI's Sora 2 API support with synced audio generation!
Unlike proprietary solutions, MediaRouter gives you:
- ✅ Complete source code access
- ✅ Self-hosted deployment
- ✅ No usage limits or restrictions
- ✅ Community-driven development
- ✅ MIT licensed - use it anywhere
- 🔌 Unified API: Single OpenAI-compatible endpoint for multiple providers
- 🎨 Beautiful Playground: Modern React UI with shadcn/ui components
- 🔑 BYOK Model: Bring Your Own Keys - no vendor lock-in
- 🎯 Multiple Providers: Support for Sora 2, Runway, Kling, and more
- 📊 Usage Tracking: Monitor costs, generation times, and success rates
- 🎬 Video Gallery: Browse and manage your generated videos
- 🚀 One Command Setup: Get started instantly with Docker Compose
- 🔒 Secure: Encrypted API key storage with industry-standard encryption
| OpenAI Sora | Sora 2, Sora 1 | ✅ | ✅ | ✅ Public | $0.10/sec |
| Runway | Gen-3, Gen-4 | ✅ | ❌ | ✅ Public | Usage-based |
| Kling AI | v1.5, v1.0 | ✅ | ❌ | ✅ Public | Credit-based |
| Pika Labs | Coming soon | ✅ | - | 🚧 Planned | - |
| Luma Dream Machine | Coming soon | ✅ | - | 🚧 Planned | - |
All Three Providers Working: Sora 2, Runway, and Kling all have public APIs available now!
Get MediaRouter running in 3 commands:
That's it! ⚡ The script automatically:
- ✅ Pulls pre-built Docker images (no build time!)
- ✅ Generates secure encryption keys
- ✅ Creates storage directories
- ✅ Starts all services
Setup time: ~30 seconds
- Open http://localhost:3000
- Add API Keys → Go to Settings → Add your provider keys
- Generate Videos → Go to Playground → Enter a prompt → Generate!
That's it! You're ready to create videos.
- Docker installed
- API keys from supported providers
- Navigate to Settings page
- Click "Add API Key"
- Select your provider (OpenAI, Runway, or Kling)
- Paste your API key
- Click "Add Key" to validate and save
- Go to the Playground page
- Enter your prompt (e.g., "A serene sunset over mountains")
- Select your desired model
- Configure parameters:
- Duration: 1-10 seconds
- Aspect Ratio: 16:9, 9:16, or 1:1
- Seed: Optional, for reproducibility
- Click "Generate Video"
- Wait for generation to complete
- Download or view your video
- Visit the Gallery page
- View all your generated videos
- Filter by provider or status
- Download or delete videos
Response:
Visit http://localhost:3001/docs for interactive API documentation.
- Visit OpenAI Platform
- Sign up or log in
- Navigate to API Keys section
- Create new API key
- Note: Sora access may require waitlist approval
- Visit Runway
- Sign up for an account
- Go to Settings → API Keys
- Generate new API key
- Visit Kling AI
- Create an account
- Navigate to API section
- Generate API key
If you want to build from source:
- Create a new provider file in backend/src/providers/
- Implement the VideoProvider interface
- Add provider to PROVIDERS dict in __init__.py
- Add model mappings to MODEL_PROVIDER_MAP
- Test the provider integration
Example:
- API keys are encrypted using Fernet (symmetric encryption)
- Encryption keys are stored in .env (never commit to git)
- HTTPS recommended for production deployments
- CORS is configured for allowed origins only
If you see "denied" errors when pulling images:
- Check provider API status
- Verify API key validity in Settings
- Check backend logs: docker compose logs -f backend
- Some providers have rate limits
- Sora may require waitlist approval
Generate videos with any provider using a beautiful, intuitive interface
Browse, filter, and manage all your generated videos in one place
Monitor spending, generation times, and success rates across all providers
Securely add and manage API keys for multiple providers
View detailed usage statistics in the Settings page:
- Total generations
- Cost breakdown by provider/model
- Average generation times
- Success/failure rates
We love contributions! MediaRouter is built by the community, for the community.
- 🐛 Report bugs and issues
- 💡 Suggest new features or providers
- 📝 Improve documentation
- 🔧 Submit pull requests
- ⭐ Star the repo to show support
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Make your changes
- Test locally with docker compose -f docker-compose.local.yml up --build
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
- Follow existing code style (FastAPI for backend, React for frontend)
- Add tests for new features
- Update documentation
- Ensure Docker builds succeed
- Add provider integrations using the VideoProvider interface
See CLAUDE.md for detailed development guide.
This project is licensed under the MIT License - see the LICENSE file for details.
What this means:
- ✅ Commercial use allowed
- ✅ Modification allowed
- ✅ Distribution allowed
- ✅ Private use allowed
- ❌ No warranty provided
- ❌ No liability accepted
If MediaRouter is helpful to you:
- ⭐ Star this repo - It helps others discover the project
- 🐦 Share on social media - Spread the word
- 💬 Join discussions - Share your use cases and ideas
- 🤝 Contribute - Code, docs, or ideas welcome
- 🐛 Report bugs - Help us improve
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📖 Documentation: Full Documentation
- Additional providers (Pika, Luma, Haiper)
- Image-to-video support
- Video-to-video transformations
- Batch generation
- Webhook notifications
- CLI tool
- Python/TypeScript SDKs
- Sora 2 API integration
- Runway Gen-3/Gen-4 support
- Kling AI v1.5 support
- Usage tracking and analytics
- Pre-built Docker images
- OpenAI-compatible API
Built with amazing open source technologies:
- FastAPI - Modern Python web framework
- React - UI library
- shadcn/ui - Beautiful UI components
- Tailwind CSS - Utility-first CSS
- Docker - Containerization
.png)


