๐ŸŽฌ New โ€” watch the 2-minute guide videos โ†’

Collections

A collection is a named, versioned fallback chain for one catalog model โ€” a tested sequence of { model, provider } steps you can publish, share, and import. Think of it as a routing recipe: "for llama-3.1-8b-instruct, try my own GPU first, then Krutrim, then OpenRouter." Collections carry steps and a README only โ€” never API keys.

Public registry

Anyone โ€” human or agent โ€” can browse published collections; no auth needed.

EndpointReturns
GET /v1/collectionsPublic registry, top 200 by stars then recency.
GET /v1/collections/:slugOne collection with its version history.

Fork-before-use

When you import a collection that belongs to another org, BharatRouter first forks it โ€” taking a private snapshot into your org โ€” and then applies that snapshot. The lineage (forked_from) is kept, but the original author's later edits never silently change your routing. Importing your own collection applies it directly, no fork. An existing fork is reused rather than duplicated.

Import โ†’ your routing

Importing sets the collection's steps as your org's saved fallback chain for that model, effective within a minute. From then on, requests for that model follow the chain (a per-request fallbacks array still wins for a single call).

POST /me/collections/import/india-first-llama
โ†’ { "ok": true, "model": "llama-3.1-8b-instruct",
    "steps": [ {"model":"llama-3.1-8b-instruct","provider":"vllm"},
               {"model":"llama-3.1-8b-instruct","provider":"krutrim"} ],
    "forked_as": "india-first-llama-2" }

If a step references a BYOK model (provider/model-id) or a BYOE endpoint (byoe:<slug>), it resolves only once your org has that key saved or that endpoint registered โ€” unresolved steps are skipped at request time, exactly like an empty link in the chain.

Creating & managing

EndpointWhat it does
GET /me/collectionsYour org's collections (private, public, forked).
POST /me/collectionsCreate one โ€” name, model, steps, description?, readme_md?, public? (owner/admin).
PATCH /me/collections/:idEdit it; changing steps or README bumps the version (owner/admin).
DELETE /me/collections/:idDelete it (owner/admin).
POST /me/collections/star/:slugToggle a star (one per org โ€” the ranking signal).
POST /me/collections/fork/:slugFork a public collection into your org without importing it.
POST /me/collections/import/:slugFork-if-foreign, then apply as your routing (owner/admin).

Members can star and fork; only owners and admins create, edit, delete, or import. Limits: up to 50 collections per org, README up to 20,000 characters, names up to 80 characters. Slugs are auto-generated and collision-suffixed within your org.

Reliability monitoring

Any collection can be marked monitored: BharatRouter then canaries every step on a schedule and tracks per-step uptime and p95 latency, with email/webhook alerts on error rate or latency. See Reliability monitoring.

From agents (MCP)

Agents get the same surface over MCP: list_collections (read) and import_collection (write โ€” requires user_confirmed: true, fork-before-use applies).