⚡ New — Kimi K3 is live: bring your own Moonshot key →
Documentation

Migrate from Groq

← All migration guides

Inference providerone-line swap

Point Groq's OpenAI-compatible client at BharatRouter.

The change

Before — Groq

from openai import OpenAI

client = OpenAI(
    base_url="https://api.groq.com/openai/v1",
    api_key="gsk_...",
)

After — BharatRouter

from openai import OpenAI

client = OpenAI(
    base_url="https://api.bharatrouter.com/v1",
    api_key="br-...",
)

What maps to what

GroqBharatRouter
Groq model ids (e.g. llama-3.3-70b-versatile)Catalog id, or Groq key via BYOK
gsk_… keybr-… key (or BYOK to Groq)

What you gain

  • Keep Groq's speed as one optimize: "latency" route, with fallbacks behind it.
  • INR billing; add India-resident routes to the same chain.

Watch out for

  • Groq is not India-resident — it won't be selected under data_policy: "india_only".

Stuck on a migration? Email [email protected], see the FAQ, or keep your accounts and rates with BYOK.