Bring Your Own Key (BYOK)
Use your own provider API keys while routing through Visgate.
BYOK mode lets you use your own provider API keys (Fal, Replicate, Runway, RunPod) while still routing through Visgate for billing, caching, and usage tracking.
BYOK mode requires both a Visgate API key (for authentication and base fee billing) and a provider key (for actual generation). Visgate bills only the base fee; provider costs go directly to your provider account.
Client Configuration
Server-Side BYOK
When using the server proxy, set BYOK keys as environment variables on the server. The proxy injects them automatically so the client never sees the keys.
Then in your client:
How BYOK Billing Works
| Mode | Provider cost | Visgate fee |
|---|---|---|
| Managed | Paid by Visgate (included in your bill) | Full price |
| BYOK | Paid by you directly to the provider | Base fee only |
In BYOK mode, result.mode will be "byok" and result.cost reflects only the Visgate base fee.