{"id":50493419,"url":"https://github.com/vargHQ/sdk","last_synced_at":"2026-06-18T22:00:57.020Z","repository":{"id":326775566,"uuid":"1101631030","full_name":"vargHQ/sdk","owner":"vargHQ","description":"AI video generation SDK — JSX for videos. One API for Kling, Flux, ElevenLabs, Veed. Built on Vercel AI SDK.","archived":false,"fork":false,"pushed_at":"2026-06-08T04:42:14.000Z","size":3106,"stargazers_count":318,"open_issues_count":57,"forks_count":21,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-08T06:23:41.006Z","etag":null,"topics":["ai-sdk","ai-video","claude-code","cursor","elevenlabs","flux","generative-ai","image-to-video","jsx","kling","lipsync","seedance","sora","text-to-speech","text-to-video","typescript","vercel-ai-sdk","video-api","video-generation","wan"],"latest_commit_sha":null,"homepage":"https://varg.ai/sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vargHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-22T00:47:34.000Z","updated_at":"2026-06-08T04:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2103759-4240-4c27-9dc1-4b91d6701e1f","html_url":"https://github.com/vargHQ/sdk","commit_stats":null,"previous_names":["varghq/sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vargHQ/sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargHQ%2Fsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargHQ%2Fsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargHQ%2Fsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargHQ%2Fsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vargHQ","download_url":"https://codeload.github.com/vargHQ/sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vargHQ%2Fsdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34508867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-sdk","ai-video","claude-code","cursor","elevenlabs","flux","generative-ai","image-to-video","jsx","kling","lipsync","seedance","sora","text-to-speech","text-to-video","typescript","vercel-ai-sdk","video-api","video-generation","wan"],"created_at":"2026-06-02T05:00:33.188Z","updated_at":"2026-06-18T22:00:57.014Z","avatar_url":"https://github.com/vargHQ.png","language":"TypeScript","funding_links":[],"categories":["🤖 AI \u0026 Machine Learning"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003evarg — Agentic AI Video Generation SDK\u003c/h1\u003e\n  \u003cp align=\"center\"\u003eCreate AI videos with JSX. One SDK for Kling, Flux, ElevenLabs, Sora and more. Built on Vercel AI SDK.\u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vargai\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/vargai.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vargai\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/vargai.svg\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/vargHQ/sdk/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/vargHQ/sdk\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/vargHQ/sdk/blob/main/LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-Apache--2.0-blue\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://docs.varg.ai\"\u003eDocs\u003c/a\u003e \u0026middot; \u003ca href=\"https://app.varg.ai\"\u003eDashboard\u003c/a\u003e \u0026middot; \u003ca href=\"https://docs.varg.ai/quickstart\"\u003eQuickstart\u003c/a\u003e \u0026middot; \u003ca href=\"https://docs.varg.ai/sdk/models\"\u003eModels\u003c/a\u003e \u0026middot; \u003ca href=\"https://discord.gg/varg\"\u003eDiscord\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n**varg** is an open-source TypeScript SDK for AI video generation. One API key, one gateway — generate images, video, speech, music, lipsync, and captions through `varg.*` providers. Write videos as JSX components (like React), render locally or in the cloud.\n\n## Get started\n\n### For AI agents (recommended)\n\nInstall the varg skill into Claude Code, Cursor, Windsurf, or any agent that supports skills. Zero code — just prompt.\n\n```bash\n# 1. Install the varg skill\nnpx -y skills add vargHQ/skills --all --copy -y\n\n# 2. Set your API key (get one at app.varg.ai)\nexport VARG_API_KEY=varg_live_xxx\n\n# 3. Create your first video\nclaude \"create a 10-second product video for white sneakers, 9:16, UGC style, with captions and background music\"\n```\n\nThe agent writes declarative JSX, varg handles AI generation + caching + rendering.\n\n### For developers\n\n```bash\n# Install with bun (recommended)\nbun install vargai ai\n\n# Or with npm\nnpm install vargai ai\n\n# Set up project (auth, skills, hello.tsx, cache dirs)\nbunx vargai init\n```\n\n`vargai init` handles everything: signs you in, installs the agent skill, creates a starter template, and sets up your project structure.\n\nThen render the starter template:\n\n```bash\nbunx vargai render hello.tsx\n```\n\nOr ask your AI agent to create something from scratch.\n\n## How it works\n\n```\nYour prompt / JSX code\n        |\n   varg gateway (api.varg.ai)\n   /     |      \\        \\\n Kling  Flux  ElevenLabs  Wan ...   (AI providers)\n   \\     |      /        /\n    varg render engine\n        |\n   output.mp4\n```\n\n- **One API key** (`VARG_API_KEY`) routes to all providers through the varg gateway\n- **Declarative JSX** — compose videos like React components with `\u003cClip\u003e`, `\u003cVideo\u003e`, `\u003cMusic\u003e`, `\u003cCaptions\u003e`\n- **Automatic caching** — same props = instant cache hit at $0. Re-render without re-generating\n- **Local or cloud** — render with `bunx vargai render` locally, or submit via the Cloud Render API\n\n## Quick examples\n\n### Image to video\n\n```tsx\nimport { Render, Clip, Image, Video } from \"vargai/react\";\nimport { varg } from \"vargai/ai\";\n\nconst character = Image({\n  prompt: \"cute kawaii orange cat, round body, big eyes, Pixar style\",\n  model: varg.imageModel(\"nano-banana-pro\"),\n  aspectRatio: \"9:16\",\n});\n\nexport default (\n  \u003cRender width={1080} height={1920}\u003e\n    \u003cClip duration={5}\u003e\n      \u003cVideo\n        prompt={{ text: \"cat waves hello, bounces happily\", images: [character] }}\n        model={varg.videoModel(\"kling-v3\")}\n      /\u003e\n    \u003c/Clip\u003e\n  \u003c/Render\u003e\n);\n```\n\n```bash\nbunx vargai render hello.tsx\n```\n\n### With music and captions\n\n```tsx\nimport { Render, Clip, Image, Video, Speech, Captions, Music } from \"vargai/react\";\nimport { varg } from \"vargai/ai\";\n\nconst character = Image({\n  model: varg.imageModel(\"nano-banana-pro\"),\n  prompt: \"friendly robot, blue metallic, expressive eyes\",\n  aspectRatio: \"9:16\",\n});\n\nconst voiceover = Speech({\n  model: varg.speechModel(\"eleven_v3\"),\n  voice: \"adam\",\n  children: \"Hello! I'm your AI assistant. Let me show you something cool!\",\n});\n\nexport default (\n  \u003cRender width={1080} height={1920}\u003e\n    \u003cMusic prompt=\"upbeat electronic, cheerful\" model={varg.musicModel()} volume={0.15} /\u003e\n    \u003cClip duration={5}\u003e\n      \u003cVideo\n        prompt={{ text: \"robot talking, subtle head movements\", images: [character] }}\n        model={varg.videoModel(\"kling-v3\")}\n      /\u003e\n    \u003c/Clip\u003e\n    \u003cCaptions src={voiceover} style=\"tiktok\" color=\"#ffffff\" withAudio /\u003e\n  \u003c/Render\u003e\n);\n```\n\n### Talking head with lipsync\n\n```tsx\nimport { Render, Clip, Image, Video, Speech, Captions, Music } from \"vargai/react\";\nimport { varg } from \"vargai/ai\";\n\nconst voiceover = Speech({\n  model: varg.speechModel(\"eleven_v3\"),\n  voice: \"josh\",\n  children: \"With varg, you can create any videos at scale!\",\n});\n\nconst baseCharacter = Image({\n  prompt: \"woman, sleek black bob hair, fitted black t-shirt, natural look\",\n  model: varg.imageModel(\"nano-banana-pro\"),\n  aspectRatio: \"9:16\",\n});\n\nconst animatedCharacter = Video({\n  prompt: {\n    text: \"woman speaking naturally, subtle head movements, friendly expression\",\n    images: [baseCharacter],\n  },\n  model: varg.videoModel(\"kling-v3\"),\n});\n\nexport default (\n  \u003cRender width={1080} height={1920}\u003e\n    \u003cMusic prompt=\"modern tech ambient, subtle electronic\" model={varg.musicModel()} volume={0.1} /\u003e\n    \u003cClip duration={5}\u003e\n      \u003cVideo\n        prompt={{ video: animatedCharacter, audio: voiceover }}\n        model={varg.videoModel(\"sync-v2-pro\")}\n      /\u003e\n    \u003c/Clip\u003e\n    \u003cCaptions src={voiceover} style=\"tiktok\" color=\"#ffffff\" withAudio /\u003e\n  \u003c/Render\u003e\n);\n```\n\n## Components\n\n| Component | Purpose | Key props |\n|-----------|---------|-----------|\n| `\u003cRender\u003e` | Root container | `width`, `height`, `fps` |\n| `\u003cClip\u003e` | Time segment | `duration`, `transition`, `cutFrom`, `cutTo` |\n| `\u003cImage\u003e` | AI or static image | `prompt`, `src`, `model`, `zoom`, `aspectRatio`, `resize` |\n| `\u003cVideo\u003e` | AI or source video | `prompt`, `src`, `model`, `volume`, `cutFrom`, `cutTo` |\n| `\u003cSpeech\u003e` | Text-to-speech | `voice`, `model`, `volume`, `children` |\n| `\u003cMusic\u003e` | Background music | `prompt`, `src`, `model`, `volume`, `loop`, `ducking` |\n| `\u003cTitle\u003e` | Text overlay | `position`, `color`, `start`, `end` |\n| `\u003cSubtitle\u003e` | Subtitle text | `backgroundColor` |\n| `\u003cCaptions\u003e` | Auto-generated subs | `src`, `srt`, `style`, `color`, `activeColor`, `withAudio` |\n| `\u003cOverlay\u003e` | Positioned layer | `left`, `top`, `width`, `height`, `keepAudio` |\n| `\u003cSplit\u003e` | Side-by-side | `direction` |\n| `\u003cSlider\u003e` | Before/after reveal | `direction` |\n| `\u003cSwipe\u003e` | Tinder-style cards | `direction`, `interval` |\n| `\u003cTalkingHead\u003e` | Animated character | `character`, `src`, `voice`, `model`, `lipsyncModel` |\n| `\u003cPackshot\u003e` | End card with CTA | `background`, `logo`, `cta`, `blinkCta` |\n\n### Caption styles\n\n```tsx\n\u003cCaptions src={voiceover} style=\"tiktok\" /\u003e     // word-by-word highlight\n\u003cCaptions src={voiceover} style=\"karaoke\" /\u003e    // fill left-to-right\n\u003cCaptions src={voiceover} style=\"bounce\" /\u003e     // words bounce in\n\u003cCaptions src={voiceover} style=\"typewriter\" /\u003e // typing effect\n```\n\n### Transitions\n\n67 GL transitions available:\n\n```tsx\n\u003cClip transition={{ name: \"fade\", duration: 0.5 }}\u003e\n\u003cClip transition={{ name: \"crossfade\", duration: 0.5 }}\u003e\n\u003cClip transition={{ name: \"wipeleft\", duration: 0.5 }}\u003e\n\u003cClip transition={{ name: \"cube\", duration: 0.8 }}\u003e\n```\n\n## Models\n\nAll models are accessed through `varg.*` — one API key, one provider.\n\n```typescript\nimport { varg } from \"vargai/ai\";\n```\n\n### Video\n\n| Model | Use case | Credits (5s) |\n|-------|----------|-------------|\n| `varg.videoModel(\"kling-v3\")` | Best quality, latest | 150 |\n| `varg.videoModel(\"kling-v3-standard\")` | Good quality, cheaper | 50 |\n| `varg.videoModel(\"kling-v2.5\")` | Previous gen, reliable | 50 |\n| `varg.videoModel(\"wan-2.5\")` | Good for characters | 50 |\n| `varg.videoModel(\"minimax\")` | Alternative | 50 |\n| `varg.videoModel(\"sync-v2-pro\")` | Lipsync (video + audio) | 50 |\n\n### Image\n\n| Model | Use case | Credits |\n|-------|----------|---------|\n| `varg.imageModel(\"nano-banana-pro\")` | Versatile, fast | 5 |\n| `varg.imageModel(\"nano-banana-pro/edit\")` | Image-to-image editing | 5 |\n| `varg.imageModel(\"flux-schnell\")` | Fast generation | 5 |\n| `varg.imageModel(\"flux-pro\")` | High quality | 25 |\n| `varg.imageModel(\"recraft-v3\")` | Alternative | 10 |\n\n### Audio\n\n| Model | Use case | Credits |\n|-------|----------|---------|\n| `varg.speechModel(\"eleven_v3\")` | Text-to-speech | 25 |\n| `varg.speechModel(\"eleven_multilingual_v2\")` | Multilingual TTS | 25 |\n| `varg.musicModel()` | Music generation | 25 |\n| `varg.transcriptionModel(\"whisper\")` | Speech-to-text | 5 |\n\n1 credit = $0.01. Cache hits are always free.\n\n## CLI\n\n```bash\nbunx vargai login                              # sign in (email OTP or API key)\nbunx vargai init                               # set up project (auth + skills + template)\nbunx vargai render video.tsx                   # render a video\nbunx vargai render video.tsx --preview         # free preview with placeholders\nbunx vargai render video.tsx --verbose         # render with detailed output\nbunx vargai balance                            # check credit balance\nbunx vargai topup                              # add credits\nbunx vargai run image --prompt \"sunset\"        # generate a single image\nbunx vargai run video --prompt \"ocean waves\"   # generate a single video\nbunx vargai list                               # list available models and actions\nbunx vargai studio                             # open visual editor\n```\n\n## Environment\n\n```bash\n# Required — one key for everything\nVARG_API_KEY=varg_live_xxx\n```\n\nGet your API key at [app.varg.ai](https://app.varg.ai). Bun auto-loads `.env` files.\n\n\u003cdetails\u003e\n\u003csummary\u003eBring your own keys (optional)\u003c/summary\u003e\n\nYou can use provider keys directly if you prefer:\n\n```bash\nFAL_API_KEY=fal_xxx                # fal.ai direct\nELEVENLABS_API_KEY=xxx             # ElevenLabs direct\nOPENAI_API_KEY=sk_xxx              # OpenAI / Sora\nREPLICATE_API_TOKEN=r8_xxx         # Replicate\n```\n\nSee the [BYOK docs](https://docs.varg.ai/sdk/byok) for details.\n\n\u003c/details\u003e\n\n## Pricing\n\n| Action | Model | Credits | Cost |\n|--------|-------|---------|------|\n| Image | nano-banana-pro | 5 | $0.05 |\n| Image | flux-pro | 25 | $0.25 |\n| Video (5s) | kling-v3 | 150 | $1.50 |\n| Speech | eleven_v3 | 25 | $0.25 |\n| Music | music_v1 | 25 | $0.25 |\n| Cache hit | any | 0 | $0.00 |\n\nA typical 3-clip video costs $2-5. Cache hits are always free.\n\n## Star History\n\n\u003cimg width=\"2832\" height=\"2253\" alt=\"star-history-202643\" src=\"https://github.com/user-attachments/assets/63e84279-d756-43a9-b328-118fb69ed2d5\" /\u003e\n\n\n## Discord \n\n[https://discord.com/channels/1463766525117861922/1463766526250188824\n](https://discord.com/invite/VAecJay7R9)\n\n## Contributing\n\nSee [CONTRIBUTING.md](.github/CONTRIBUTING.md) for development setup.\n\n## License\n\nApache-2.0 — see [LICENSE.md](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FvargHQ%2Fsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FvargHQ%2Fsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FvargHQ%2Fsdk/lists"}