vargHQ/sdk

AI video generation SDK — JSX for videos. One API for Kling, Flux, ElevenLabs, Veed. Built on Vercel AI SDK.

What it solves

This SDK simplifies the complex process of creating AI-generated videos by providing a unified API and a declarative way to compose them. Instead of managing multiple separate AI providers for images, video, speech, and music, developers can use a single API key to access a variety of high-end models (like Kling, Flux, and ElevenLabs) and structure their videos using JSX components.

How it works

Users write videos as declarative JSX components (e.g., <Clip>, <Video>, <Music>, <Captions>), similar to how one would build a UI in React. These components are sent to the varg API, which routes the requests to the appropriate AI providers and then passes the generated assets to a render engine that produces the final .mp4 file. The system includes automatic caching, meaning that if the same props are used, the result is retrieved from the cache for free instead of being re-generated.

Who it’s for

  • AI Agents: The SDK provides "skills" that can be installed into agents like Claude Code, Cursor, or Windsurf, allowing them to generate videos via prompts.
  • Developers: TypeScript developers who want to programmatically create AI videos with a React-like syntax and a unified provider interface.

Highlights

  • Unified API: Access to multiple video, image, and audio models through one API key.
  • JSX-based Composition: Compose videos using components like <TalkingHead>, <Captions>, and <Split>.
  • Agentic Workflow: Direct integration with AI agents via installable skills.
  • Automatic Caching: Reduces costs and speeds up re-renders by avoiding redundant generations.
  • Extensive Component Library: Includes 67 GL transitions and various caption styles (e.g., TikTok, Karaoke).
  • Flexible Rendering: Supports both local rendering via CLI and cloud-based rendering.