varg: TypeScript SDK for AI video generation
varg is an open-source TypeScript SDK for AI video generation.
Verified
Core facts
Read by a script from the official API, not rewritten by a model.
- Repository
- https://github.com/vargHQ/sdk
- License
- Apache-2.0
- Languages
- TypeScript
- Maintainer
- vargHQ
- Homepage
- https://varg.ai/sdk
- Verified
What it is
varg is an open-source TypeScript SDK for AI video generation. varg is one SDK for Kling, Flux, ElevenLabs and more, built on Vercel AI SDK. The README states that JSX/TSX videos are deprecated. varg is licensed under Apache-2.0.
Main features
With one API key and one API, varg generates images, video, speech, music, lipsync and captions through its providers.
varg lets users write videos as JSX components (like React) and render them locally or in the cloud.
In varg, the agent writes declarative JSX, and varg handles AI generation, caching and rendering.
varg offers 67 GL transitions.
Cache hits are always free.
Getting started
The varg skill can be installed into Claude Code, Cursor, Windsurf, or agents that support skills.
The init command of vargai signs you in, installs the agent skill and sets up your project structure.
The SDK commands (init, run, list and others) run on Bun however the package is installed, so Bun is a prerequisite for the npm route too; the standalone vargai command line is a single file and needs neither Node nor Bun.
From the terminal, you can generate with the varg API or the varg MCP tools and edit with the ffmpeg tool.
You can also use provider keys directly, as an optional bring-your-own-keys setup.
# 1. Install the varg skill
npx -y skills add vargHQ/skills --all --copy -y
# 2. Set your API key (get one at app.varg.ai)
export VARG_API_KEY=varg_live_xxx
# 3. Create your first video
claude "create a 10-second product video for white sneakers, 9:16, UGC style, with captions and background music"# Install with bun (recommended)
bun install vargai ai
# Or with npm
npm install vargai ai
# Set up project (auth, skills, cache dirs)
bunx vargai initWho it is for
The CLI does not render JSX/TSX any more. The rest of the README describes the deprecated JSX API. The Render component is the root container.
The Clip component is a time segment. The Image component is an AI or static image. The Video component is an AI or source video.
The Speech component is for text-to-speech. The Music component is for background music. The Captions component is for auto-generated subs.
The Split component is side-by-side. The TalkingHead component is an animated character. The Packshot component is an end card with CTA.
1 credit = $0.01. A 5s video with kling-v3 costs 150 credits, which is $1.50. An image with nano-banana-pro costs 5 credits, which is $0.05.
Speech with eleven_v3 costs 25 credits, which is $0.25. The whisper transcription model is listed for speech-to-text at 5 credits. The README states that a typical 3-clip video costs $2-5.
Sources
This page is written from the official sources below. Open them to check the original text.
- GitHub READMEhttps://github.com/vargHQ/sdkFetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.