free-router-proxy README

The project's README from github.com/www222fff/free-router-proxy. As one markdown file: README.md.

Free Router

Free Router architecture: any OpenAI client to a local gateway to pluggable providers

Local OpenAI-compatible gateway. Point any client at http://127.0.0.1:8787/v1 and use free-best. It ranks currently free models across any OpenAI-compatible provider you configure, then fails over when one is rate-limited, down, or empty. A missing key just drops that provider.

Site: www222fff.github.io/free-router

Run

Node.js 20+. Copy .env.example to .env, add at least one provider key, then:

git clone https://github.com/www222fff/free-router.git
cd free-router
cp .env.example .env
./start.sh

Stop with ./stop.sh. Docker: docker compose up -d. Open http://127.0.0.1:8787/ to set keys and watch usage.

Variable Where
GEMINI_API_KEY Google AI Studio
OPENROUTER_API_KEY openrouter.ai/keys
TOKENROUTER_API_KEY TokenRouter
BAI_API_KEY chat.b.ai

More providers: add a block in config.json. See How it works.

./models.sh          # current free-best order
./models.sh --usage  # today's quota

Star History

Star History Chart

free-router-proxy (www222fff/free-router-proxy)

Searching Database…

What is this?Free Router is a local OpenAI-compatible gateway that points your client at free models from any OpenAI-compatible provider you configure, ranking them and failing over automatically when one is rate-limited, down, or has no key.
Is this a hosted service or something I run myself?It's a self-hosted local server (Node.js app or Docker container) that you run on your own machine, not a hosted cloud service.
How do I get it running?Run it with Node.js 20+: copy .env.example to .env, add at least one provider key, then start the server; stop it with ./stop.sh. Alternatively run it with Docker Compose via 'docker compose up -d'.
What do I need before running this?You need Node.js 20 or newer (or Docker if using the compose setup) and at least one API key from an OpenAI-compatible provider offering free models.
What happens if a provider's free quota runs out?If a configured provider is rate-limited, down, or empty, Free Router automatically fails over to the next ranked provider; a provider with no key configured is simply skipped.
What platforms can I run this on?It runs anywhere Node.js 20+ or Docker is available, including Linux, macOS, and Windows.
How does it pick which free model to use?It ranks currently free models across all the OpenAI-compatible providers you've configured and routes to the best available one, switching automatically on failure.
Can I point my existing OpenAI client at it?Yes, since it exposes an OpenAI-compatible API, you just point any existing OpenAI client at your local Free Router endpoint instead of the provider's endpoint.
Do I need to configure every provider?No, you only need to add keys for the providers you want to use; providers without a key configured are automatically skipped.
Creator
www222fff
Size
0.6 MB
Stars
478
Age
1mo
Commits · 90 Days