{
 "info": {
  "name": "BharatRouter API",
  "description": "India's AI inference gateway. Set the `apiKey` variable to your br-... key (hello@bharatrouter.com for beta access). Standard chat-completions wire format — extensions: optimize (price|latency|uptime), provider (pin), data_policy (india_only), upstream_key (BYOK).",
  "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
 },
 "variable": [
  {
   "key": "baseUrl",
   "value": "https://api.bharatrouter.com"
  },
  {
   "key": "apiKey",
   "value": "br-REPLACE-ME"
  }
 ],
 "auth": {
  "type": "bearer",
  "bearer": [
   {
    "key": "token",
    "value": "{{apiKey}}",
    "type": "string"
   }
  ]
 },
 "item": [
  {
   "name": "Health (no auth)",
   "request": {
    "auth": {
     "type": "noauth"
    },
    "method": "GET",
    "url": "{{baseUrl}}/health"
   }
  },
  {
   "name": "List models (no auth)",
   "request": {
    "auth": {
     "type": "noauth"
    },
    "method": "GET",
    "url": "{{baseUrl}}/v1/models"
   }
  },
  {
   "name": "Pricing comparison (no auth)",
   "request": {
    "auth": {
     "type": "noauth"
    },
    "method": "GET",
    "url": "{{baseUrl}}/v1/pricing/compare"
   }
  },
  {
   "name": "List providers (no auth)",
   "request": {
    "method": "GET",
    "url": "{{baseUrl}}/v1/providers",
    "auth": {
     "type": "noauth"
    },
    "description": "Provider registry: configured status, residency, BYOK support, platform-key fallback. Use these ids for the 'provider' request field and BYOK."
   }
  },
  {
   "name": "Model 7-day stats (no auth)",
   "request": {
    "method": "GET",
    "url": "{{baseUrl}}/v1/models/krutrim-2/stats",
    "auth": {
     "type": "noauth"
    },
    "description": "7-day traffic stats for one model: success rate, p50/p95 latency, tokens/sec."
   }
  },
  {
   "name": "Chat completion",
   "request": {
    "method": "POST",
    "url": "{{baseUrl}}/v1/chat/completions",
    "header": [
     {
      "key": "Content-Type",
      "value": "application/json"
     }
    ],
    "body": {
     "mode": "raw",
     "raw": "{\n  \"model\": \"qwen2.5-7b-instruct\",\n  \"messages\": [{\"role\": \"user\", \"content\": \"namaste\"}],\n  \"optimize\": \"price\",\n  \"data_policy\": \"india_only\"\n}"
    }
   }
  },
  {
   "name": "Chat completion (streaming)",
   "request": {
    "method": "POST",
    "url": "{{baseUrl}}/v1/chat/completions",
    "header": [
     {
      "key": "Content-Type",
      "value": "application/json"
     }
    ],
    "body": {
     "mode": "raw",
     "raw": "{\n  \"model\": \"qwen2.5-7b-instruct\",\n  \"stream\": true,\n  \"messages\": [{\"role\": \"user\", \"content\": \"count to 5\"}]\n}"
    }
   }
  },
  {
   "name": "Chat via BYOK (your provider key)",
   "request": {
    "method": "POST",
    "url": "{{baseUrl}}/v1/chat/completions",
    "header": [
     {
      "key": "Content-Type",
      "value": "application/json"
     }
    ],
    "body": {
     "mode": "raw",
     "raw": "{\n  \"model\": \"sarvam-30b\",\n  \"messages\": [{\"role\": \"user\", \"content\": \"namaste\"}],\n  \"upstream_key\": \"YOUR-SARVAM-KEY\"\n}"
    }
   }
  },
  {
   "name": "Embeddings",
   "request": {
    "method": "POST",
    "url": "{{baseUrl}}/v1/embeddings",
    "header": [
     {
      "key": "Content-Type",
      "value": "application/json"
     }
    ],
    "body": {
     "mode": "raw",
     "raw": "{\n  \"model\": \"text-embedding-3-small\",\n  \"input\": \"namaste bharat\"\n}"
    }
   }
  }
 ]
}