About this project
MultiRouter AI acts as a single API endpoint that intelligently routes chat completion requests across multiple AI provider accounts. It enables users to stack free-tier API keys from services like Groq, Cerebras, and Gemini, automatically failing over when one account hits rate limits. The system is fully compatible with the OpenAI API specification, making it plug-and-play for IDEs such as Cursor, Windsurf, Claude Code, Aider, and others that support custom OpenAI base URLs.
Configuration is managed through a YAML file (`providers.yaml`) where users define provider instances, API keys, supported models, and routing priority. Providers are tried in order — typically free tiers first, paid ones last — with automatic cooldown and reactivation after rate limits expire. Two routing strategies are available: 'exhaust' (default), which uses each provider until exhausted, and 'round-robin', which distributes requests evenly across active instances using the special model name `multirouter-auto`.
The server supports streaming responses via Server-Sent Events (SSE) in OpenAI format, and exposes standard endpoints like `/v1/chat/completions`, `/v1/models`, and `/health`. It runs on Node.js 20+ with Express 5 and TypeScript 5.9, includes built-in rate limiting and authentication via bearer token, and can integrate local or self-hosted models via the `openai-compatible` provider type with a custom `base_url`.
Security best practices include ignoring `providers.yaml` in git and supporting environment variable interpolation for secrets. The project is MIT licensed and designed for developers seeking uninterrupted AI access by pooling multiple provider quotas without modifying client applications.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.