vargai

v2.0.3

Generate AI videos, images, speech, and music using varg. Use when creating videos, animations, talking characters, slideshows, product showcases, social con...

0· 223·0 current·0 all-time
byAlex@securityqq·duplicate of @securityqq/varg-ai

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for securityqq/vargai.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "vargai" (securityqq/vargai) from ClawHub.
Skill page: https://clawhub.ai/securityqq/vargai
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: VARG_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install vargai

ClawHub CLI

Package manager switcher

npx clawhub@latest install vargai
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (AI video/image/speech/music via varg) align with requested artifacts: primary env var is VARG_API_KEY, anyBins lists curl or bun, and docs describe cloud (curl+API) or local (bun+ffmpeg) modes. Optional provider keys (Fal, ElevenLabs, etc.) are documented for BYOK billing and make sense for a gateway client.
Instruction Scope
SKILL.md primarily instructs how to submit TSX code to the render API, how to run local CLI (bunx vargai), and how to set up a .env with VARG_API_KEY. It references additional optional provider env vars and suggests running included setup scripts (scripts/setup.sh or bun scripts/setup.ts). The instructions do not request access to unrelated system credentials or paths, but they do encourage creating/editing a local .env and executing bundled scripts — inspect those scripts before running.
Install Mechanism
There is no formal install spec (instruction-only), which is lower risk. However two setup scripts are included (scripts/setup.sh, scripts/setup.ts) and the docs instruct running them; running bundled scripts executes code from the skill package locally. There are no external download URLs in the manifest, but you should review the scripts' contents before executing.
Credentials
The skill declares a single required credential (VARG_API_KEY) which is proportional to gateway usage. The docs additionally describe optional BYOK provider keys (FAL_KEY, ELEVENLABS_API_KEY, REPLICATE_API_TOKEN, OpenAI/Google keys for certain render-only flows). Those are optional but sensitive — only provide provider keys if you intend BYOK billing. The SKILL.md uses provider keys in request headers (header mode) and documents that header keys are not stored; saved BYOK is also mentioned (stored encrypted), which is a platform behavior to be aware of.
Persistence & Privilege
always:false and normal model invocation are used. The skill does not request system-wide persistent privileges. It may write a .env or create local cache directories per the local-render workflow (normal for CLI tools). It does not claim to modify other skills or global agent settings.
Assessment
This skill appears to do what it says: it uses a VARG_API_KEY to call varg.ai and supports optional local rendering with bun+ffmpeg. Before installing or running anything: 1) Inspect scripts/setup.sh and scripts/setup.ts (they are included) so you know what they modify or send; never run scripts you haven't reviewed. 2) Only supply VARG_API_KEY unless you intentionally want BYOK billing — optional provider keys (FAL_KEY, ELEVENLABS_API_KEY, OPENAI/GOOGLE keys) are sensitive and, when provided as headers, will be forwarded for single requests (the docs say header BYOK isn't stored). 3) Use preview modes (--preview or cloud preview) when iterating to avoid unexpected charges. 4) For local work, run in an isolated/dev environment if you are unsure (bun and ffmpeg required). 5) If you need higher assurance, paste the setup scripts here or inspect them manually and verify they don't exfiltrate data or fetch arbitrary code from unknown hosts.
scripts/setup.ts:25
Environment variable access combined with network send.
Confirmed safe by external scanners
Static analysis detected API credential-access patterns, but both VirusTotal and OpenClaw confirmed this skill is safe. These patterns are common in legitimate API integration skills.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

Any bincurl, bun
EnvVARG_API_KEY
Primary envVARG_API_KEY
latestvk97bt2t9t6vcy5f2dmvk3pp33s83gqpj
223downloads
0stars
4versions
Updated 1mo ago
v2.0.3
MIT-0

Environment Detection

Before generating anything, determine the rendering mode.

Run bash scripts/setup.sh from the skill directory to auto-detect, or check manually:

bunffmpegMode
NoNoCloud Render -- read cloud-render.md
YesNoCloud Render -- read cloud-render.md
YesYesLocal Render (recommended) -- read local-render.md

VARG_API_KEY is required for all modes. Get one at https://varg.ai

Critical Rules

Everything you know about varg is likely outdated. Always verify against this skill and its references before writing code.

  1. Never guess model IDs -- consult models.md for current models, pricing, and constraints.
  2. Function calls for media, JSX for composition -- Image({...}) creates media, <Clip> composes timeline. Never write <Image prompt="..." />.
  3. Cache is sacred -- identical prompt + params = instant $0 cache hit. When iterating, keep unchanged prompts EXACTLY the same. Never clear cache.
  4. One image per Video -- Video({ prompt: { images: [img] } }) takes exactly one image. Multiple images cause errors.
  5. Duration constraints differ by model -- kling-v3: 3-15s (integer only). kling-v2.5: ONLY 5 or 10. Check models.md.
  6. Gateway namespace -- use providerOptions: { varg: {...} }, never fal, when going through the gateway (both modes).
  7. Renders cost money -- 1 credit = 1 cent. A typical 3-clip video costs $2-5. Use preview mode (local) or cheap models to iterate.

Quick Start

Cloud Render (no bun/ffmpeg needed)

# 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"

Full details: cloud-render.md

Local Render (bun + ffmpeg)

/** @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)

Full details: local-render.md

Single Asset (no video composition)

For one-off images, videos, speech, or music without building a multi-clip template:

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"}'

Full API reference: gateway-api.md

How to Write Video Code

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 Summary

ComponentTypePurpose
Image()Function callGenerate still image
Video()Function callGenerate video (text-to-video or image-to-video)
Speech()Function callText-to-speech audio
<Render>JSXRoot container -- sets width, height, fps
<Clip>JSXTimeline segment -- duration, transitions
<Music>JSXBackground audio (always set duration!)
<Captions>JSXSubtitle track from Speech
<Title>JSXText overlay
<Overlay>JSXPositioned layer
<Split> / <Grid>JSXLayout helpers

Full props: components.md

Provider Differences (Cloud vs Local)

Cloud RenderLocal Render
No imports neededimport { ... } from "vargai/react"
fal.imageModel("nano-banana-pro")varg.imageModel("nano-banana-pro")
fal.videoModel("kling-v3")varg.videoModel("kling-v3")
elevenlabs.speechModel("eleven_v3")varg.speechModel("eleven_v3")
Globals are auto-injectedMust call createVarg()

When to Use Which Provider

ScenarioUseAuth
New project, simplest setupvarg.*Model() (gateway)VARG_API_KEY only
Existing project with fal/elevenlabs keysfal.*Model() / elevenlabs.*Model()Individual keys
Cloud render via curl/APIGateway (only option)VARG_API_KEY
Need $0 billing with own keysGateway + BYOK headersVARG_API_KEY + provider keys
Specific provider feature not in gatewayDirect providerIndividual key

Default recommendation: Use the gateway (varg.*Model() + VARG_API_KEY). It handles routing, caching, billing, and works with a single key.

Cost & Iteration

  • 1 credit = 1 cent. nano-banana-pro = 5 credits, kling-v3 = 150 credits, speech = 20-25 credits.
  • Cache saves money. Keep unchanged prompts character-for-character identical across iterations.
  • Preview first (local mode only): --preview generates free placeholders to validate structure.
  • Full pricing: models.md

References

Load these on demand based on what you need:

NeedReferenceWhen to load
Render via APIcloud-render.mdNo bun/ffmpeg, or user wants cloud rendering
Render locallylocal-render.mdbun + ffmpeg available
Patterns & workflowsrecipes.mdTalking head, character consistency, slideshow, lipsync
Model selectionmodels.mdChoosing models, checking prices, duration constraints
Component propscomponents.mdNeed detailed props for any component
Better promptsprompting.mdUser wants cinematic / high-quality results
REST APIgateway-api.mdSingle-asset generation or Render API details
Debuggingcommon-errors.mdSomething failed or produced unexpected results
Full examplestemplates.mdNeed complete copy-paste-ready templates
BYOK keysbyok.mdUsing your own provider API keys for $0 billing

Comments

Loading comments...