VARG_API_KEY) for all AI generation. This key authenticates you with the varg gateway, which routes requests to the right AI provider (Fal, ElevenLabs, Higgsfield, Replicate) and handles billing.
Get your API key
Option 1: Sign up on the web
- Go to app.varg.ai
- Sign up with your email
- Copy your API key from the dashboard
Option 2: Log in from the CLI
- Email login — enter your email, receive a 6-digit code, verify it. Creates an account and API key automatically.
- Paste API key — if you already have one from the dashboard.
~/.varg/credentials (permissions 0600).
Option 3: Agent-driven login (for AI agents)
AI agents can drive the login flow usingcurl — no interactive CLI needed:
Using your API key
In a .env file (recommended for projects)
.env — no dotenv needed.
As an environment variable
In global credentials
The CLI saves credentials to~/.varg/credentials:
VARG_API_KEY is not set in the environment.
In code
Credits and billing
Check your balance
balance_cents: 10000 means 10,000 credits ($100).
Add credits
| Package | Credits | Price |
|---|---|---|
| Starter | 2,000 | $20 |
| Basic | 5,000 | $50 |
| Popular | 10,000 | $100 |
| Pro | 20,000 | $200 |
| Business | 50,000 | $500 |
| Enterprise | 100,000 | $1,000 |
Pricing
| Action | Model | Credits | Cost |
|---|---|---|---|
| Image | nano-banana-pro | 5 | $0.05 |
| Image | flux-pro | 25 | $0.25 |
| Video (5s) | kling-v3 | 150 | $1.50 |
| Video (5s) | seedance-2-preview | 250 | $2.50 |
| Video (5s) | wan-2.5 | 75 | $0.75 |
| Speech | eleven_v3 | 25 | $0.25 |
| Music | music_v1 | 25 | $0.25 |
CLI commands
| Command | Description |
|---|---|
bunx vargai login | Sign in or paste API key |
bunx vargai logout | Clear saved credentials |
bunx vargai balance | Check credit balance |
bunx vargai topup | Open billing page in browser |