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

Migrate from OpenAI / Azure OpenAI

← All migration guides

Frontier APIone-line swap

Change the base URL and the key. Nothing else.

The change

Before — OpenAI / Azure OpenAI

from openai import OpenAI

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

After — BharatRouter

from openai import OpenAI

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

What maps to what

OpenAI / Azure OpenAIBharatRouter
sk-… keybr-… key (mint on the dashboard)
Azure deployment nameCatalog model id (e.g. gpt-5-mini)
per-request user fieldUnchanged — passes straight through

What you gain

  • INR billing with prepaid credits — no card on file, no FX surprise.
  • Add data_policy: "india_only" to keep regulated traffic in India.
  • optimize price/latency/uptime routing across providers, not one vendor.

Watch out for

  • Keep your OpenAI account too? Use BYOK to ride your own rates through BharatRouter.
  • Org-scoped headers (OpenAI-Organization) aren't needed and are ignored.

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