whatisgithub

What is mini-router?

ujjwalchaudhary/mini-router — explained in plain English

Analysis updated 2026-05-18

2PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A self-hosted gateway that combines 16+ free AI providers into one OpenAI-compatible API, with per-user limits, cost tracking, and a web dashboard.

Mindmap

mindmap
  root((MiniRouter))
    What it does
      Combines free AI providers
      OpenAI-compatible API
      Per-user rate limits
      Cost tracking dashboard
    Tech stack
      Python
      Docker
      OpenAI API format
    Use cases
      Self-host an AI gateway
      Manage team API access
      Track usage per user
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run a private, self-hosted alternative to OpenRouter using only free provider tiers.

USE CASE 2

Give a team shared API access with per-user daily request limits.

USE CASE 3

Point existing OpenAI client code at a self-hosted gateway with minimal changes.

USE CASE 4

Track cost savings and usage analytics through a web dashboard.

What is it built with?

PythonDockerOpenAI API

How does it compare?

ujjwalchaudhary/mini-router0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity3/52/52/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires free API keys from each provider you want to enable, then Python, Docker, or a Windows start script to run the server.

Licensed under MIT, explicitly free for commercial use, modification, and redistribution, as long as the copyright notice is kept.

So what is it?

MiniRouter is a self-hosted tool that combines more than 16 free AI providers, such as Gemini, Groq, Mistral, Cerebras, and HuggingFace, into a single API you run on your own server. It is meant to work like OpenRouter, a paid hosted service that gives access to many AI models through one interface, except MiniRouter runs on hardware you control and does not charge a monthly fee, since it relies entirely on providers' free tiers. The API speaks the same format that OpenAI's own API uses, so existing code written for OpenAI's client libraries can point at MiniRouter with only the base address and key changed. You get your own free API keys from each provider you want to use, list them in a configuration file along with a priority order, and the router picks between them accordingly. Setup can be done by running the Python code directly, using Docker Compose, or, on Windows, a one-click start script. Beyond routing requests, MiniRouter includes an admin API for creating individual user accounts with their own daily request limits, listing existing users, and pulling analytics on usage. A web dashboard shows the health status of each connected provider, usage statistics, estimated cost savings compared to paying for a service like OpenRouter, and tools for managing users. Rate limits and cost tracking apply per user rather than being shared globally across everyone using the server. The README lists specific free tier limits and relative speed for each supported provider, ranging from very fast options like Groq and Cerebras to slower ones like HuggingFace, so someone setting this up can choose providers that fit their needs. The project is released under the MIT license, which explicitly allows commercial use, and the maintainers welcome outside contributions through issues or pull requests.</content>

Copy-paste prompts

Prompt 1
Explain how to add my Gemini and Groq API keys to config.json.
Prompt 2
Walk me through starting MiniRouter with Docker Compose.
Prompt 3
How do I create a new user with a daily request limit through the admin API?
Prompt 4
What's the difference in free tier limits across the supported providers?

Frequently asked questions

What is mini-router?

A self-hosted gateway that combines 16+ free AI providers into one OpenAI-compatible API, with per-user limits, cost tracking, and a web dashboard.

What language is mini-router written in?

Mainly Python. The stack also includes Python, Docker, OpenAI API.

What license does mini-router use?

Licensed under MIT, explicitly free for commercial use, modification, and redistribution, as long as the copyright notice is kept.

How hard is mini-router to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mini-router for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.