About Polyrouter
PolyRouter runs on your own machine as a gateway for AI traffic. It exposes a single /v1 endpoint compatible with the OpenAI API, then forwards requests to the providers you have configured, translating request and response formats where the upstream provider uses a different one.
Providers are connected from a local dashboard using OAuth or API keys. The gateway supports model combos with fallback, multiple accounts per provider with account-level fallback, token refresh, quota monitoring, and usage and cost tracking. State is kept locally in SQLite.
It installs from npm with a global install or via npx, and the dashboard and API then listen on localhost port 20128. The repository also contains a Dockerfile and docker-compose file. It is built on Next.js, published under the MIT license, and an optional cloud sync can mirror state across devices.
Key features
- Single OpenAI-compatible /v1 endpoint for many providers
- Translates request and response formats between providers
- Model combos with fallback sequences
- Provider connections via OAuth or API key
- Usage, cost tracking and request logging
- Account-level fallback across several accounts per provider
Good fit for
- Pointing AI coding tools at one endpoint
- Failing over between accounts or models
- Tracking AI usage and cost locally
Polyrouter: questions and answers
- What is Polyrouter used for?
- PolyRouter is an MIT-licensed local AI gateway that exposes one OpenAI-compatible /v1 endpoint and routes requests across many providers. It is a good fit for pointing AI coding tools at one endpoint, failing over between accounts or models, and tracking AI usage and cost locally.
- Is Polyrouter open source?
- No. Polyrouter is proprietary (closed-source) software. In the AI Infrastructure category, open-source options include GPT-Load, LiteLLM and Sim.
- Can I self-host Polyrouter?
- Yes. Although Polyrouter is closed source, it can be self-hosted on your own servers.
- What are some alternatives to Polyrouter?
- Polyrouter competes with OpenRouter, Portkey and AnyRouter.
Open-source alternatives to Polyrouter
See allGPT-Load
AI Infrastructure
Self-hosted AI gateway for scheduling API keys and subscription accounts across 35 channel
MIT★ 7.2k
LiteLLM
AI Infrastructure
The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (o
OSSvs Amazon Bedrock★ 64k
Sim
AI Infrastructure
Sim is the collaborative workspace to build, deploy, and monitor AI agents and workflows.
Apache-2.0vs Gumloop★ 30k
One API
AI Infrastructure
LLM API 管理 & 分发系统,支持 OpenAI、Azure、Anthropic Claude、Google Gemini、DeepSeek、字节豆包、ChatGLM、文心一
MITvs OpenRouter★ 37k
Supavec
AI Infrastructure
The open-source alternative to Carbon.ai. Build powerful RAG applications with any data so
Apache-2.0vs Vectara★ 1.2k
WeKnora
AI Infrastructure
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous
OSS★ 38k
SaaS alternatives to Polyrouter
See all
OpenRouter
AI Infrastructure
Unified API gateway for accessing many large language models from one endpoint
SaaS
Portkey
AI Infrastructure
AI gateway and observability platform for managing LLM requests
SaaS
AnyRouter
AI Infrastructure
Unified LLM gateway that routes coding agents and MCP servers through a single endpoint
SaaSAI Stats
AI Infrastructure
Database of AI models plus an OpenAI-compatible gateway with usage, pricing and reliability monitoring
SaaS
AllToken
AI Infrastructure
Unified API gateway to LLMs from OpenAI, Anthropic and Google with usage tracking and routing
SaaS
api-hub.ai
AI Infrastructure
Single API for accessing many AI models behind one endpoint
SaaS

