s3.varg.ai.
Base URL
Authentication
All requests require a varg API key:bunx vargai login. See Authentication for details.
Bring Your Own Key (BYOK)
You can also pass your own provider keys to bypass varg billing. See the BYOK guide for a full tutorial.Quick Start
Generate a video and poll for the result:TypeScript SDK
Thevargai package provides a high-level provider for AI SDK integration:
@vargai/gateway package exposes VargClient:
Generate video
Generate image
Generate speech
Upload a file
Model resolution
Models can be specified asprovider:model or just the model name. The gateway resolves the provider automatically.
| Model | Provider |
|---|---|
kling-v3, kling-v2.6, kling-v2.5 | Fal |
seedance-2-preview, seedance-2-fast-preview | PiAPI |
wan-2.5, minimax, ltx | Fal |
nano-banana-pro, flux-schnell, flux-pro | Fal |
sync-v2, sync-v2-pro, omnihuman | Fal |
recraft-v3 | Fal |
eleven_v3, eleven_multilingual_v2, eleven_flash_v2_5 | ElevenLabs |
music_v1 | ElevenLabs |
soul | Higgsfield |
background-remover | Replicate |
whisper | Fal |
Caching
All generations are cached. Same parameters return instantly from cache at no cost. The cache key is computed from: capability, model, prompt, duration/aspect ratio, and file content hashes (not URLs). Response headers:Billing
Cache hits are free. Only cache misses with pooled keys are billed. BYOK users pay $0 varg cost. You’re billed directly by the provider. Key resolution order:X-Provider-Key-*header — BYOK, $0- Dashboard-saved key — BYOK, $0
- Varg pooled key — metered billing
Error codes
| Status | Error | Description |
|---|---|---|
| 400 | ValidationError | Invalid request body |
| 401 | AuthError | Missing or invalid API key |
| 402 | InsufficientBalanceError | Account balance too low |
| 404 | NotFoundError | Job or file not found |
| 413 | — | File too large (max 50MB) |
| 429 | RateLimitError | Too many requests |
| 500 | InternalError | Server error |
| 502 | ProviderError | Upstream provider failed |
Rate limits
| Plan | Requests/minute | Concurrent jobs |
|---|---|---|
| Free | 10 | 2 |
| Pro | 100 | 10 |
| Enterprise | Custom | Custom |