Polyrouter

SaaS

PolyRouter is an MIT-licensed local AI gateway that exposes one OpenAI-compatible /v1 endpoint and routes requests across many providers.

github.com
Polyrouter homepage screenshot

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
Tags
ai gateway
openai compatible
llm router
proxy
open source
nextjs

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 all

SaaS alternatives to Polyrouter

See all