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

Use BharatRouter in your coding tool

BharatRouter speaks the OpenAI (and Anthropic) wire format, so your existing coding tool works with a base URL and a key — no re-learning. This page is the one-stop setup for Claude Code,Codex, Cursor and Hermes, plus the zero-installPlayground. Same models, one br- key.

Step 1 — get your key

Sign in and mint a key once (SSO-auto for Ola): go tobharatrouter.com/startCreate my key → copy it. It's shown once — save it somewhere private. This br-… key is all any tool below needs.

No install — just chat (everyone)

Not a terminal person, or just want to try a model? Open the Playground: sign in at/startOpen the console → Playground → start chatting in your browser. Works on any OS, nothing to install. Use glm-5.3-flash.

Claude Code & Codex (terminal, via brcode)

brcode installs the real Claude Code / Codex CLIs and wires them to BharatRouter — one command each. Update to the latest first (it carries the current models and the session-key fix):

curl -fsSL https://bharatrouter.com/install/brcode.sh | bash
# macOS Apple Silicon can also: brew update && brew upgrade brcode
brcode version   # confirm 0.5.8 or newer

Then log in, pick a model, and launch your harness:

brcode login
brcode model glm-5.3-flash     # or gpt-oss-120b / kimi-k3
brcode claude                  # Claude Code   —or—   brcode codex

Switch models anytime with brcode model <id>, or per-launch withBHARATROUTER_MODEL=<id> brcode claude. brcode mints and manages the key for you.

Claude Code — manual (no brcode)

Claude Code uses BharatRouter's native Anthropic /v1/messages surface — point it at the root host (no /v1):

{claudeEnv}

Codex — manual (no brcode)

Codex uses the Responses API — add a custom provider in ~/.codex/config.toml:

{codexToml}
export BHARATROUTER_API_KEY=br-...
codex

Only the Codex CLI can be repointed — the ChatGPT-Codex web/desktop app is OpenAI-hosted and cannot use a custom endpoint. For a GUI, use Cursor or Hermes.

Cursor (IDE — native macOS & Windows)

In Cursor: Settings → Models

  • Override OpenAI Base URL: https://api.bharatrouter.com/v1
  • OpenAI API Key: your br-… key
  • Add model: glm-5.3-flash (and gpt-oss-120b, kimi-k3)
  • Enable it, then pick the model in the dropdown.

Cursor's chat/inline use the custom endpoint; some Cursor "agent/composer" features are gated to Cursor's own models.

Hermes (GUI app)

Hermes is a drop-in GUI for the Codex/Claude interface. In the app it'sSettings → Providers → Custom Endpoints → Add Endpoint (not "Accounts") — base URLhttps://api.bharatrouter.com/v1, your br- key, model glm-5.3-flash. Full walkthrough with screenshots: the Hermes guide. If the CLI installer fails on your Mac, see the install-trouble notes — or just use one of the paths above.

Which model?

ModelBest forServed on
glm-5.3-flashYour default — fast (~1s to first token), 1M-token context, day-to-day coding and big-context prompts.Krutrim Cloud
gpt-oss-120bHeavier, multi-step agentic work and long tool-loops.Krutrim Cloud
kimi-k3Hardest reasoning tasks — use sparingly, it runs on outside providers, not Krutrim Cloud.External providers

Always use the exact model id — lowercase, hyphenated (glm-5.3-flash, not "GLM 5.3 Flash"). A display name or wrong casing returns 404 model_not_found. The canonical ids are at /models. See the measured comparison vs Claude & GPT inthe write-up.

Platforms

PlatformClaude Code / Codex / brcodeCursorPlayground
macOS Apple Silicon (M1/M2/M3)Native — brew or curl installerNativeYes
macOS Intel (x86_64)Native — use the curl installer (Homebrew is dropping Intel)NativeYes
WindowsVia WSL (Ubuntu) — run the Linux steps inside itNativeYes
Linux (x86_64 / arm64)NativeNativeYes

Universal fallback for any OS: the browser Playground (no install).

Troubleshooting

SymptomFix
Model list doesn't show glm-5.3-flash (brcode)Update brcode to 0.5.8+ (brew upgrade brcode or the curl installer). It's the default from 0.5.8.
"This API key was revoked" / retrying (Claude Code, Codex)Update brcode and re-run brcode login — the session-key issue is fixed server-side; a fresh login gets a stable key. Or use a durable key created in the console.
Model not switching / 404 model_not_foundUse the exact lowercase-hyphenated id (glm-5.3-flash), not a display name.
Hermes "Test" → "could not reach …/v1/models"Untick Discover models, type the model id manually, and Save — the endpoint works for chat regardless. Retrying the Test usually clears it (transient network).
Hermes installer fails (Intel warning / M1 error / 403)That's Nous's installer, not BharatRouter — use Claude Code, Cursor, or the Playground instead (all reach the same models).

Still stuck? Ask on buzz-help.