Esc to close · ⌘K / Ctrl-K opens search anywhere
Bring your own provider key to ride your account and rates, with BharatRouter routing on top.
upstream_key (BYOK)AccessIntermediate8 min
BYOK ("bring your own key") lets you use a provider you already have an account with — Krutrim Cloud, Sarvam, Mistral and 25+ more — through BharatRouter. You keep your negotiated rates and pay the upstream directly; BharatRouter adds routing, failover and residency on top.
You'll use: a saved BYOK key or the inline upstream_key field. Reference: BYOK.
On the dashboard, add the provider key under BYOK. It's encrypted at rest (AES-256-GCM), never shown again, and used only in-flight. After that, just request the model — the gateway uses your key automatically.
curl https://api.bharatrouter.com/v1/chat/completions \
-H "Authorization: Bearer br-..." -H "Content-Type: application/json" \
-d '{
"model": "gemma-4-e4b-it",
"messages": [{"role": "user", "content": "namaste"}],
"provider": "krutrim",
"upstream_key": "YOUR_KRUTRIM_CLOUD_KEY"
}'upstream_key is used to authenticate to the provider for that request only — never stored, never logged.BYOK unlocks the model but routes to your provider — so a non-India upstream is offshore. Combine with india_only only for India-resident providers.
More recipes in the Cookbook, or see the fullAPI reference.