Loading...
Loading...
Generate AI videos, images, speech, and music using varg. Use when creating videos, animations, talking characters, slideshows, product showcases, social content, or single-asset generation. Supports zero-install cloud rendering (just API key + curl) and full local rendering (bun + ffmpeg). Triggers: "create a video", "generate video", "make a slideshow", "talking head", "product video", "generate image", "text to speech", "varg", "vargai", "render video", "lip sync", "captions".
npx skill4agent add varghq/skills varg-aibash scripts/setup.sh| bun | ffmpeg | Mode |
|---|---|---|
| No | No | Cloud Render -- read cloud-render.md |
| Yes | No | Cloud Render -- read cloud-render.md |
| Yes | Yes | Local Render (recommended) -- read local-render.md |
VARG_API_KEYImage({...})<Clip><Image prompt="..." />Video({ prompt: { images: [img] } })providerOptions: { varg: {...} }fal# Submit TSX code to the render service
curl -s -X POST https://render.varg.ai/api/render \
-H "Authorization: Bearer $VARG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "const img = Image({ model: fal.imageModel(\"nano-banana-pro\"), prompt: \"a cabin in mountains at sunset\", aspectRatio: \"16:9\" });\nexport default (<Render width={1920} height={1080}><Clip duration={3}>{img}</Clip></Render>);"}'
# Poll for result (repeat until "completed" or "failed")
curl -s https://render.varg.ai/api/render/jobs/JOB_ID \
-H "Authorization: Bearer $VARG_API_KEY"/** @jsxImportSource vargai */
import { Render, Clip, Image } from "vargai/react"
import { createVarg } from "@vargai/gateway"
const varg = createVarg({ apiKey: process.env.VARG_API_KEY! })
const img = Image({
model: varg.imageModel("nano-banana-pro"),
prompt: "a cabin in mountains at sunset",
aspectRatio: "16:9"
})
export default (
<Render width={1920} height={1080}>
<Clip duration={3}>{img}</Clip>
</Render>
)bunx vargai render video.tsx --preview # free preview
bunx vargai render video.tsx --verbose # full render (costs credits)curl -X POST https://api.varg.ai/v1/image \
-H "Authorization: Bearer $VARG_API_KEY" \
-d '{"model": "nano-banana-pro", "prompt": "a sunset over mountains"}'// 1. GENERATE media via function calls
const img = Image({ model: ..., prompt: "..." })
const vid = Video({ model: ..., prompt: { text: "...", images: [img] }, duration: 5 })
const voice = Speech({ model: ..., voice: "rachel", children: "Hello!" })
// 2. COMPOSE via JSX tree
export default (
<Render width={1080} height={1920}>
<Music model={...} prompt="upbeat electronic" duration={10} volume={0.3} />
<Clip duration={5}>
{vid}
<Title position="bottom">Welcome</Title>
</Clip>
<Captions src={voice} style="tiktok" />
</Render>
)| Component | Type | Purpose |
|---|---|---|
| Function call | Generate still image |
| Function call | Generate video (text-to-video or image-to-video) |
| Function call | Text-to-speech audio |
| JSX | Root container -- sets width, height, fps |
| JSX | Timeline segment -- duration, transitions |
| JSX | Background audio (always set |
| JSX | Subtitle track from Speech |
| JSX | Text overlay |
| JSX | Positioned layer |
| JSX | Layout helpers |
| Cloud Render | Local Render |
|---|---|
| No imports needed | |
| |
| |
| |
| Globals are auto-injected | Must call |
--preview| Need | Reference | When to load |
|---|---|---|
| Render via API | cloud-render.md | No bun/ffmpeg, or user wants cloud rendering |
| Render locally | local-render.md | bun + ffmpeg available |
| Patterns & workflows | recipes.md | Talking head, character consistency, slideshow, lipsync |
| Model selection | models.md | Choosing models, checking prices, duration constraints |
| Component props | components.md | Need detailed props for any component |
| Better prompts | prompting.md | User wants cinematic / high-quality results |
| REST API | gateway-api.md | Single-asset generation or Render API details |
| Debugging | common-errors.md | Something failed or produced unexpected results |
| Full examples | templates.md | Need complete copy-paste-ready templates |