# BharatRouter > India's AI gateway: Krutrim, Sarvam, and the world's best open and frontier models > behind one API, with INR pricing, enforceable India data-residency > (data_policy: india_only), and price/latency/uptime routing with automatic failover. > The API speaks the OpenAI wire format — any standard SDK works with a base-URL swap. Base URL: https://api.bharatrouter.com/v1 Auth: Authorization: Bearer br-... (sign up at https://bharatrouter.com/login; new orgs get ₹100 credit) Native Anthropic surface: POST https://api.bharatrouter.com/v1/messages speaks the Anthropic Messages wire format for the Claude models (claude-sonnet-5, claude-opus-4.8, claude-haiku-4.5). Present the br- gateway key on any of: x-br-api-key (side channel — leaves Authorization free to forward a personal Anthropic/Max credential for BYOK passthrough), Authorization: Bearer, or x-api-key (Anthropic-SDK drop-in: Anthropic(base_url="https://api.bharatrouter.com", api_key="br-...") works unmodified). Only a br-/Ekam-shaped value on x-api-key is read as the gateway key — a passthrough sk-ant-... is never mistaken for one. Billing: prepaid INR credits, per-token rates at https://bharatrouter.com/models MCP server (for agents): POST https://api.bharatrouter.com/mcp (streamable HTTP, bearer key) ## Docs - [Overview & quickstart](https://bharatrouter.com/docs): curl, Python, Node examples; streaming; embeddings - [API reference](https://bharatrouter.com/docs/api-reference): every endpoint — inference, catalog, dashboard, webhooks — with request/response shapes - [Routing & residency](https://bharatrouter.com/docs/routing): optimize (price|latency|uptime), provider pinning, data_policy: india_only, failover, circuit breakers - [Web search (:online)](https://bharatrouter.com/docs/web-search): make any model live — add `:online` to the model id, or send the `web` plugin (engine exa|brave|tavily, max_results, include/exclude_domains). Default engine Exa (OpenRouter-parity); Brave/Tavily are BYOK. Native-first: where the routed model runs search itself and you've saved that provider's key, its own native search is used instead — OpenAI (`gpt-4o-search-preview`, `gpt-4o-mini-search-preview` via `web_search_options`) and Anthropic (`claude-*` on `/v1/messages`, server-side `web_search` tool). Native search is BYOK-only (the provider bills your key; ₹0 on us). Results come back as `url_citation` annotations; `x-br-web-search` header reports what ran. Enabling search sends the query to a global engine → residency: global (don't combine with data_policy: india_only). Fail-open: a search error never breaks the completion. - [Sangam — consensus routing](https://bharatrouter.com/sangam): model ids `bharatrouter/open-sangam` (open-weight panel) and `bharatrouter/sangam` (frontier panel) — a panel answers in parallel and a synthesizer reconciles one best answer; BYOK-capable on every variant (your keys or ours); custom panels via the request field `sangam: {panel:[2-6 model ids], synth}`; OpenAI-compatible, discoverable in /v1/models, callable via the MCP chat tool - [Sangam docs & tutorial](https://bharatrouter.com/docs/sangam): how consensus works, the two variants, custom panels, BYOK, curl/Python/MCP examples - [Sangam benchmark](https://bharatrouter.com/sangam/benchmark): methodology, multi-axis comparison, cost model (measured results coming) - [Collections](https://bharatrouter.com/docs/collections): shareable, versioned fallback chains — publish, fork-before-use, import into your routing - [Reliability monitoring](https://bharatrouter.com/docs/monitoring): canary a collection's steps on a schedule; per-step uptime/p95 latency; error_rate/latency_p95 alerts via email/webhook (free in beta) - [Bring your own endpoint (BYOE)](https://bharatrouter.com/docs/byoe): register your own OpenAI-compatible deployment as a ₹0 fallback step (byoe:slug) after a compliance test - [API keys & limits](https://bharatrouter.com/docs/api-keys): trial vs standard tiers, rate limits, per-key monthly ₹ budgets, ephemeral keys - [BYOK](https://bharatrouter.com/docs/byok): bring your own Krutrim/Sarvam/Groq/Mistral/etc. keys; encrypted storage; model discovery as provider/model-id - [Credits & billing](https://bharatrouter.com/docs/billing): topups (Razorpay, ₹100–₹1,000 in beta), promo codes, debits, receipts - [Usage & activity](https://bharatrouter.com/docs/usage): token usage, per-request activity feed, public model rankings - [Teams & workspaces](https://bharatrouter.com/docs/teams): org roles, workspaces, per-workspace monthly ₹ budgets - [Errors](https://bharatrouter.com/docs/errors): JSON error envelope and every error code with handling guidance - [MCP for agents](https://bharatrouter.com/docs/mcp): tools (list_models, chat, health, key management, collections, BYOE, monitoring), ephemeral sub-keys ## Guides & cookbook - [Cookbook](https://bharatrouter.com/cookbook): copy-paste recipes — SDKs, streaming, routing, BYOK, Sangam consensus, agents - [Run an open coding agent on GLM](https://bharatrouter.com/cookbook/code-with-glm): OpenCode driving GLM through BharatRouter - [Guides](https://bharatrouter.com/guides): step-by-step walkthroughs and short screencasts - [Cookbook & benchmarks on GitHub](https://github.com/bharatrouter/cookbook): clone-and-run recipes plus the reproducible model benchmarks behind the blog ## Blog - [Zero to a GLM coding agent in one command](https://bharatrouter.com/blog/zero-to-glm): one-command install, BYOK setup, automatic first query - [The GLM host showdown — Baseten vs OpenRouter vs Zhipu](https://bharatrouter.com/blog/glm-host-showdown): benchmarked throughput/cost across three hosts, plus reliability via failover routing and the optimize knob - [Can a GLM consensus replace a frontier model?](https://bharatrouter.com/blog/glm-vs-frontier): reproducible benchmark — open GLM (single + Sangam) vs Claude Opus 4.8 and GPT-5.5 on quality, cost and speed (14 execution-checked coding tasks, 10 runs each); scripts + raw results at https://github.com/bharatrouter/cookbook ## Machine-readable - [llms-full.txt](https://bharatrouter.com/llms-full.txt): the whole reference in one fetch — endpoints, extensions, errors, BYOK, billing rules, MCP tools - [OpenAPI 3.1 schema — inference](https://api.bharatrouter.com/openapi.json) - [OpenAPI 3.1 schema — management API](https://api.bharatrouter.com/openapi-management.json): /me/* keys, budgets, BYOK, workspaces, billing - [Gateway llms.txt](https://api.bharatrouter.com/llms.txt) - [MCP server card](https://api.bharatrouter.com/.well-known/mcp/server-card.json) - [Model catalog JSON](https://api.bharatrouter.com/v1/models): INR pricing, residency, languages, modalities, live health - [Usage rankings JSON](https://api.bharatrouter.com/v1/rankings): most-used models, 7d/30d - [Live status](https://status.bharatrouter.com) ## Quick example POST https://api.bharatrouter.com/v1/chat/completions Authorization: Bearer br-... {"model": "krutrim-2", "messages": [{"role": "user", "content": "namaste"}], "data_policy": "india_only", "optimize": "price"} The provider that served the request is echoed in the x-br-provider response header.