vargai) lets you create AI videos programmatically using JSX syntax. One API key, one gateway, all providers.
Installation
- Bun (recommended)
- npm
Setup
Only one key is needed:bunx vargai login.
Two Ways to Use varg
1. Gateway Mode (Recommended)
UsecreateVarg() for one-key access to all providers:
2. Direct Provider Mode (BYOK)
Use individual provider keys directly. See BYOK for details..env:
Core Concepts
Elements vs Components
In varg, media generation happens via element functions that return references:Image(), Video(), Speech() are function calls. <Music>, <Captions>, <Title> are JSX components. Never write <Image prompt="..." />.
Automatic Caching
Same props = instant cache hit at $0:Parallel Generation
Independent elements generate simultaneously:Package Exports
Environment Variables
Next Steps
Components
All JSX components and their props
AI Models
All supported models with pricing
CLI Reference
Command-line interface
Templates
Copy-paste examples