sdk  by vargHQ

AI video generation SDK with declarative JSX

Created 4 months ago
268 stars

Top 95.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

vargHQ/sdk provides a TypeScript SDK for AI video generation, abstracting multiple AI providers (Kling, Flux, ElevenLabs, Sora) into a single API. It allows developers and AI agents to create videos using a declarative JSX syntax, similar to React components, simplifying complex generation workflows. The SDK offers automatic caching, local or cloud rendering, and a unified interface for various media generation tasks, aiming to streamline AI video production.

How It Works

The core approach leverages JSX components (<Clip>, <Video>, <Image>, etc.) to define video sequences declaratively. These definitions are processed by the varg gateway, which routes requests to the appropriate underlying AI provider based on the specified model. A render engine then assembles the generated assets into a final video. This declarative model-based system enables automatic caching of identical generation requests, significantly reducing costs and improving re-render times.

Quick Start & Requirements

  • Installation: Recommended with Bun: bun install vargai ai. Alternatively, use npm: npm install vargai ai.
  • Setup: Run bunx vargai init to sign in, install agent skills, and set up a starter template.
  • Authentication: Requires a VARG_API_KEY obtained from app.varg.ai.
  • AI Agent Integration: Install the varg skill (npx -y skills add vargHQ/skills --all --copy -y) and prompt an agent.
  • Prerequisites: Bun runtime (recommended), Node.js/npm.
  • Links: Docs, Dashboard, Quickstart, Models, Discord (URLs not provided in README).

Highlighted Details

  • Declarative Video Composition: Create videos using JSX components, mirroring React patterns.
  • Unified Provider Access: Single API key and gateway for Kling, Flux, ElevenLabs, Sora, and more.
  • Automatic Caching: Identical generation requests are cached and served instantly at no cost.
  • Flexible Rendering: Supports local rendering via CLI (bunx vargai render) or cloud-based rendering.
  • Multi-modal Generation: Supports video, image, speech, music, captions, and lip-sync.
  • Extensive Model Support: Access to various models for different generation tasks and quality/cost trade-offs.

Maintenance & Community

The project provides a CONTRIBUTING.md file for development setup. A Discord community link is mentioned for support and discussion. No specific details on core maintainers, sponsorships, or partnerships are present in the README.

Licensing & Compatibility

The project is licensed under the Apache-2.0 license. This license generally permits commercial use, modification, and distribution, including in proprietary software, with attribution.

Limitations & Caveats

Video generation incurs costs based on model usage, tracked via credits (1 credit = $0.01), although cache hits are free. Bun is the recommended runtime environment. While BYOK (Bring Your Own Keys) is supported, the primary authentication relies on the VARG_API_KEY.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
34
Issues (30d)
12
Star History
34 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.