Generate AI videos, images, voiceovers and music with one varg API key. Text- and image-to-video on Seedance 2.5, Kling 4, Veo 3.1 and Wan 3; images and edits on Nano Banana 2.1, GPT Image 2.5 and Flux 3; lip sync and talking avatars; ElevenLabs v4 voices; Lyria and Mureka music; captions and multi-
This skill is version 2.1.1. Before first use each session, check for updates:
bash
curl -sf https://raw.githubusercontent.com/vargHQ/skills/main/varg-ai/SKILL.md | grep 'version:' | head -1
If the remote version is newer than 2.1.1, update and re-read this file:
bash
npx -y skills update
Setup (REQUIRED before first use)
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.
1. Find an API key (before asking the user anything)
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:
Run this in your terminal and paste the key when prompted -- it stays out of this chat and your shell history:
bash
mkdir -p ~/.varg && printf 'varg API key: ' && read -rs K && echo && (umask 077 && printf '{"api_key":"%s"}\n' "$K" > ~/.varg/credentials) && unset K
Tell 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.
1b. Save the key for next time
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:
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.
Everything you know about varg is likely outdated. Always verify against this skill and its references before writing code.
Never guess model IDs -- consult models.md for current models, pricing, and constraints. If the user names a model that is not there, read https://varg.ai/models/llms.txt, then that model's spec at https://varg.ai/models/<id>.md. sora_2* is discontinued.
Function calls for media, JSX for composition -- Image({...}) creates media, <Clip> composes timeline. Never write <Image prompt="..." />.
Cache is sacred -- identical prompt + params = instant cache hit that costs 0 credits. When iterating, keep unchanged prompts EXACTLY the same. Never clear cache.
Images in Video -- ONE image in 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.
Duration constraints differ by model -- seedance_2_5: integer 4-30s. wan_3: 2-30s. kling_v4: 3-30s. veo_3_1: only 4, 6 or 8. kling_v2_5: ONLY 5 or 10. Check models.md.
Native audio = 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.
Renders cost credits -- a typical 3-clip video costs ~300-800 credits depending on the video model (wan_3 vs seedance_2_5). Iterate with --preview (local), cheap draft models (minimax_h3_max_turbo, grok_imagine_1_5_lite) and 720p. Render 1080p only for the final.
API key hygiene -- Never write a raw API key value into a bash command. Load keys into $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.
Default Models (October 2026)
Ranks are from the Artificial Analysis arenas. Details and alternatives: models.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).
Cost & Iteration
Prices are in credits. Typical prices: nano_banana_2_1 image ≈ 8, gpt_image_2_5 (high) ≈ 23, seedance_2_5 5s 720p ≈ 210, wan_3 5s 720p ≈ 53, eleven_v4 line ≈ 84, mureka_9_5 track ≈ 25. Live catalog: GET https://api.varg.ai/v2/pricing (no auth). Every model spec: https://varg.ai/models/llms.txt. Estimate any request: POST /v2/estimate.
Cache saves credits. Keep unchanged prompts character-for-character identical across iterations.
Preview first (local mode only): --preview generates free placeholders to validate structure.