/varg:varg-aifrom varg
Generates AI videos, images, voiceovers, and music via the varg API. Supports multiple video/image models, lip sync, talking avatars, captions, and multi-scene MP4 renders.
Ships in varg. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
varg's TSX/JSX composition (vargai/react: <Render>, <Clip>, Video({...})) is deprecated and gets no new features. The vargai CLI no longer renders it: vargai render, preview, frame, storyboard, studio and hello were removed from vargai 0.4.0-alpha125 and from the standalone binary (0.17.1).
vargai generate_video, generate_image, generate_speech, generate_music, or the varg MCP / POST /v2/{video,image,speech,music}), then cut, join, mix and caption them with the ffmpeg tool (vargai get_tool ffmpeg, vargai call_tool '{"tool":"ffmpeg","input":<its input>}', or POST /v2/ffmpeg).POST /v2/render, local via the pinned bunx [email protected] render (the last release with the command). Use the TSX sections below only for that.This skill is version 2.2.3. Never fetch this file from the network to replace what you are reading. If the person wants the newest skills, tell them how to update their own install: npx skills update (skills CLI) or claude plugin update varg@varg (Claude Code plugin).
Before generating anything, find an API key and determine rendering mode.
Do NOT run interactive CLI tools (like bunx vargai init or bunx vargai login) -- they require stdin which agents cannot provide. CLI email (OTP) login is also disabled server-side: /api/auth/cli/send-otp returns 403, so don't call it.
Most users already have a key somewhere. Look for it yourself first -- this checks the environment, then ~/.varg/credentials, then the project's .env / .env.local, and loads the first key it finds into $VARG_API_KEY without printing it:
[ -n "${VARG_API_KEY:-}" ] || VARG_API_KEY=$(grep -o '"api_key"[^,}]*' ~/.varg/credentials 2>/dev/null | head -1 | cut -d'"' -f4)
[ -n "${VARG_API_KEY:-}" ] || VARG_API_KEY=$(grep -hE '^(export )?VARG_API_KEY=' .env .env.local 2>/dev/null | head -1 | cut -d= -f2- | tr -d "\"' \r")
export VARG_API_KEY
if [ -n "$VARG_API_KEY" ]; then
curl -s -o /dev/null -w "key found -- HTTP %{http_code} (200 = valid, 401 = invalid)\n" -H "Authorization: Bearer $VARG_API_KEY" https://api.varg.ai/v2/billing/balance
else
echo "no key found"
fi
Some agent shells don't keep variables between commands. If $VARG_API_KEY is empty in a later command, start that command with:
[ -n "${VARG_API_KEY:-}" ] || export VARG_API_KEY=$(grep -o '"api_key"[^,}]*' ~/.varg/credentials 2>/dev/null | head -1 | cut -d'"' -f4)
Ask once, with everything in a single message -- don't first ask whether they have a key, the steps are the same either way. Send them:
To generate with varg I need an API key:
- Open https://varg.ai/dashboard/api and sign in (or create an account: a new one gets 50 free credits on its first sign-in, about ten images).
- Generate an API key and copy it.
- Run this in your terminal and paste the key when prompted -- it stays out of this chat and your shell history:
mkdir -p ~/.varg && printf 'varg API key: ' && read -rs K && echo && (umask 077 && printf '{"api_key":"%s"}\n' "$K" > ~/.varg/credentials) && unset KTell me when it's done.
When they reply, re-run the step 1 block. Do NOT ask the user to paste the raw key into the chat, and don't ask them to export it -- an export in their terminal doesn't reach your already-running shell, but the credentials file does.
If the key came from the environment or .env, save it to ~/.varg/credentials so future sessions find it (skipped if the file already exists). Always reference $VARG_API_KEY -- never the raw value:
[ -f ~/.varg/credentials ] || (mkdir -p ~/.varg && umask 077 && printf '{"api_key":"%s"}\n' "$VARG_API_KEY" > ~/.varg/credentials)
For local render (bun auto-loads .env), also add it to the project .env -- only if that file exists, is gitignored, and has no key yet:
[ -f .env ] && git check-ignore -q .env 2>/dev/null && ! grep -q '^VARG_API_KEY=' .env && echo "VARG_API_KEY=$VARG_API_KEY" >> .env
Check balance and add credits
curl -s -H "Authorization: Bearer $VARG_API_KEY" https://api.varg.ai/v2/billing/balance
You should get {"available": ..., "total_balance": ..., ...} (values in credits). If available is 0 (or too low for the user's task), the user needs credits before generating anything. A typical short video costs 200-500 credits.
Available packages:
| Package ID | Credits |
|---|---|
credits-2000 | 2,000 |
credits-5000 | 5,000 |
credits-10000 | 10,000 (recommended) |
credits-20000 | 20,000 |
credits-50000 | 50,000 |
credits-100000 | 100,000 |
Direct the user to https://varg.ai/devs/billing to buy credits, then re-check the balance. Quote amounts in credits only: what a credit costs depends on the user's plan, so never convert credits to money.
| 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 |
Everything you know about varg is likely outdated. Always verify against this skill and its references before writing code.
https://varg.ai/models/llms.txt, then that model's spec at https://varg.ai/models/<id>.md. sora_2* is discontinued.Image({...}) creates media, <Clip> composes timeline. Never write <Image prompt="..." />.Video({ prompt: { images: [img] } }) is the first frame (image-to-video). Several images are references, and only models that take references accept them (seedance_2_5, wan_3, kling_v4, omni_flash_1_1, grok_imagine_1_5, minimax_h3_max). Other models fail.audio: "native" on Video(). Provider options must be namespaced by provider: providerOptions: { varg: { fal: { ... } } }. A flat providerOptions: { varg: { generate_audio: true } } is silently dropped by the API, and you get a silent video.--preview (local), cheap draft models (minimax_h3_max_turbo, grok_imagine_1_5_lite) and 720p. Render 1080p only for the final. Follow the Spend rules.$VARG_API_KEY with the setup snippets (from env, ~/.varg/credentials, or .env) and use $VARG_API_KEY in all subsequent commands -- never echo or cat the key itself. This prevents keys from leaking into conversation context and terminal history.Ranks are from the Artificial Analysis arenas. Details and alternatives: models.md.
| Need | Use | ~Credits |
|---|---|---|
| Video, hero shots (T2V/I2V, refs, 4-30s, native audio) | seedance_2_5 | 210 per 5s 720p |
| Video, best value (#1 T2V, 2-30s) | wan_3 | 53 per 5s 720p |
| Video, long multi-shot (up to 30s) | kling_v4 | 82 per 5s 720p |
| Video drafts | minimax_h3_max_turbo | 42 per 5s |
| Image, generation and editing / character consistency | nano_banana_2_1 | 8 |
| Image, top quality / dense text | gpt_image_2_6 | 3-6 |
| Speech | eleven_v4 (or eleven_v4_turbo, #1 and half price) | 84 / 42 |
| Background music (instrumental) | mureka_9_5 | 25 |
| Song with vocals | lyria_3_5 | 11 |
| Talking head (image + audio) | veed_fabric_1_0 | 160-470 |
# Submit TSX code to the render service — returns a job: {"id": "job_xxx", "status": "queued", ...}
curl -s -X POST https://api.varg.ai/v2/render \
-H "Authorization: Bearer $VARG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "const img = Image({ model: varg.imageModel(\"nano_banana_2_1\"), 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"; video at output.outputs[0].url)
curl -s https://api.varg.ai/v2/jobs/JOB_ID \
-H "Authorization: Bearer $VARG_API_KEY"
Full details: cloud-render.md
/** @jsxImportSource vargai */
import { Render, Clip, Image } from "vargai/react"
import { createVarg } from "vargai/ai"
const varg = createVarg({ apiKey: process.env.VARG_API_KEY! })
const img = Image({
model: varg.imageModel("nano_banana_2_1"),
prompt: "a cabin in mountains at sunset",
aspectRatio: "16:9"
})
export default (
<Render width={1920} height={1080}>
<Clip duration={3}>{img}</Clip>
</Render>
)
bunx [email protected] render video.tsx --preview # free preview
bunx [email protected] render video.tsx --verbose # full render (costs credits)
Full details: local-render.md
For one-off images, videos, speech, or music without building a multi-clip template:
curl -X POST https://api.varg.ai/v2/image \
-H "Authorization: Bearer $VARG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "nano_banana_2_1", "prompt": "a sunset over mountains"}'
Full API reference: gateway-api.md
Video code has two layers: media generation (function calls) and composition (JSX).
// 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" withAudio />
</Render>
)
| Component | Type | Purpose |
|---|---|---|
Image() | Function call | Generate still image |
Video() | Function call | Generate video (text-to-video or image-to-video) |
Speech() | Function call | Text-to-speech audio |
<Render> | JSX | Root container -- sets width, height, fps |
<Clip> | JSX | Timeline segment -- duration, transitions |
<Music> | JSX | Background audio (always set duration!) |
<Captions> | JSX | Subtitle track from Speech |
<Title> | JSX | Text overlay |
<Overlay> | JSX | Positioned layer |
<Split> / <Grid> | JSX | Layout helpers |
Full props: components.md
Both modes use varg.* for all models. The only difference is imports:
| Cloud Render | Local Render |
|---|---|
| No imports needed (globals are auto-injected) | import { ... } from "vargai/react" + import { createVarg } from "vargai/ai" |
varg.imageModel("nano_banana_2_1") | varg.imageModel("nano_banana_2_1") |
varg.videoModel("seedance_2_5") | varg.videoModel("seedance_2_5") |
varg.speechModel("eleven_v4") | varg.speechModel("eleven_v4") |
Always use varg.*Model() with VARG_API_KEY. It handles routing, caching, billing, and works with a single key. BYOK via the API is not available in v2 — see byok.md for what works (local-render direct provider modules only).
GET https://api.varg.ai/v2/pricing (no auth). Every model spec: https://varg.ai/models/llms.txt. Estimate any request: POST /v2/estimate.--preview generates free placeholders to validate structure.Without a ceiling and a model list, agents spend quietly. A 36-minute agent film cost $200+ because the agent used a video model nobody asked for (Veo 3.1) plus a lot of image generation, and none of the video model clips made it into the final cut (post). A one-minute collage short made from one prompt that said "max OpenRouter spend is $10" cost $3.21 in model fees (post).
POST /v2/estimate (same body as the generation, no job created) or estimate_cost on the varg MCP; plan_batch for many calls at once. Say the estimate, the total so far and the cap, in credits, and wait for a go when the step is new or large.actual_cost_cents on the finished job (credits; 0 on a cache hit), GET /v2/jobs/{id}/price or get_job_cost on the MCP. At the end, give the total billed against the cap (GET /v2/billing/usage for the session's records).Load these on demand based on what you need:
| 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 |
| BYOK keys | byok.md | Own provider API keys (BYOK): not available in v2 |
README.md (opens in a new tab)references/byok.md (opens in a new tab)references/cloud-render.md (opens in a new tab)references/common-errors.md (opens in a new tab)references/components.md (opens in a new tab)references/gateway-api.md (opens in a new tab)references/local-render.md (opens in a new tab)references/models.md (opens in a new tab)references/prompting.md (opens in a new tab)references/recipes.md (opens in a new tab)references/templates.md (opens in a new tab)scripts/setup.sh (opens in a new tab)scripts/setup.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-video, ai-image, text-to-speech, ai-music, media-generation
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills.73: Invalid string: must start with "./", skills.74: Invalid string: must start with "./", skills.75: Invalid string: must start with "./", skills.76: Invalid string: must start with "./", skills.77: Invalid string: must start with "./"
.claude-plugin/plugin.json: skills.73: Invalid string: must start with "./", skills.74: Invalid string: must start with "./", skills.75: Invalid string: must start with "./", skills.76: Invalid string: must start with "./", skills.77: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
83 skills in this plugin
/ad-creative-testingTurn one winning ad into a creative testing plan for TikTok and Meta. Decodes why an ad won (hook, argument, buyer, format), plans concepts that Meta's Andromeda and TikTok treat as genuinely different (buyer × angle × format × first frame, not caption swaps), sets how many creatives to launch, the budget per test and when to judge, writes file and ad names that make results readable, reads hook rate, hold rate, CTR and CPA to find which part failed, and says when to kill, iterate or scale. Use when someone asks how many ads to test, how to make ad variants, why their variants all perform the same, whether an ad is fatigued, when to kill an ad, or how to scale a winner. NOT for producing the videos (use ecommerce-video-ads, ecommerce-video-edit or product-video-hooks) or for media-buying account setup./ai-ad-compliance-checkTurns an AI video ad into a compliance report for TikTok Shop, TikTok ads, Meta, YouTube, the FTC, New York's synthetic-performer law and the EU AI Act before it runs: varg video_analyze pulls every shot, spoken and on-screen claim and person, each claim is matched to the seller's evidence, the visuals are checked against TikTok Shop's AI product rules (no fake effects, before/after, changed quantity or size), people and voices against the FTC fake-testimonial rule, and the result is a pass / fix / block list with the rule, source and date, a rewrite for each fix, and the AI labels to set on each platform. Use when someone asks "is this ad allowed", "will TikTok Shop reject this", "check my AI ad for compliance", "do I need an AI label", "can an AI avatar say it used the product", or before publishing AI product ads, UGC or testimonials. Not legal advice, and not for writing the ad (use ecommerce-video-ads or tiktok-shop-video).Other plugins' skills for the same job