Esc to close · ⌘K / Ctrl-K opens search anywhere
Serve Hindi and Indian-language chat on India-resident models, with Sarvam on your own key.
India-resident routes (Krutrim Cloud) + Sarvam BYOKSovereigntyBeginner8 min
For Indian-language products you want models that were built for Indic text and that stay in India. Open models served on Krutrim Cloud in India cover this on your credit, and Sarvam's Indic models are available on your own Sarvam key — point a system prompt at them and pin residency.
You'll use: India-resident Indic models + data_policy: "india_only". Browse them in the model catalog.
from openai import OpenAI
client = OpenAI(base_url="https://api.bharatrouter.com/v1", api_key="br-...")
r = client.chat.completions.create(
model="gemma-4-e4b-it",
messages=[
{"role": "system", "content": "Aap ek sahaayak hain. Hamesha Hindi mein jawab dein."},
{"role": "user", "content": "Maharashtra ki raajdhaani kya hai?"},
],
extra_body={"data_policy": "india_only", "optimize": "price"},
)
print(r.choices[0].message.content)| Model | Good for | Residency |
|---|---|---|
gemma-4-e4b-it | General Hindi/English chat, India-resident route | 🇮🇳 India |
sarvam/<model> | Sarvam Indic models — bring your own Sarvam key (BYOK) | 🇮🇳 India |
The first row runs on your BharatRouter credit; Sarvam needs your own key. Add a fallback chain across India-resident routes for resilience without ever leaving India.
More recipes in the Cookbook, or see the fullAPI reference.