Skip to content

Repository files navigation

freerouter

A self-hostable inference marketplace. OpenRouter without the tax — and without the center.

OpenRouter is being acquired by Stripe (Aug 2026, $7B+). Its value was never the routing — it was the single wallet: one balance across every provider, so you never hold N billing relationships. The price of that wallet is a cut off the top, and now a payments company owns it.

freerouter gives you the wallet without the cut, three ways:

  • Run it for yourself. Bring your own provider keys, pay providers directly, keep the spread.
  • Operate it for others. You hold the wallet for your customers; they top up, you route, you take the margin you set — not the one Stripe sets for you.
  • Hand it to anyone. Distributed as a hoistable recipe, so anyone stands up their own marketplace in their own session and grades that it works.

The mechanic OpenRouter can't copy: recursive tenancy

OpenRouter and Stripe are one wallet at the root. freerouter's infinitely nested tenant meter lets your customer resell to their customers, who resell to theirs, each a metered sub-wallet in the same tree. And because the whole thing is hoistable, anyone can instantiate a new root. There is no center to acquire. That is the part a payments company cannot buy out from under you.

Where freerouter sits

freerouter is deliberately not a monolith. It owns two things — the inference product and, since the 2026-08-21 subsumption, the metering library it runs on — and leans on the rest of the portfolio for what those don't cover.

Layer Where it lives Owns
Metering metering/ (in-repo library) infinitely-nested tenancy + metering of anything meterable — an isolated, extraction-ready module, the seed of forge 2.0
Inference freerouter the marketplace UX, provider routing, the OpenAI-compatible product surface
Enterprise enterprise_ai_framework utilization monitoring, use-case tooling, training-data capture — consumes freerouter, reimplements neither
Distribution hoistable packages freerouter as a self-installing, self-grading recipe

freerouter owns its meter: the metering capability lives in-repo as the isolated metering/ library, driven behind an internal seam — no external metering service to call and no external forge module linked (the dependency is severed). The library is kept extraction-clean so it can later graduate into forge 2.0, a pure infinitely-nested-tenant meter; forge itself remains a separate live repo. freerouter is the storefront and the router in front of that meter.

Run it in one command

freerouter is a single pure-Go binary. With zero configuration it comes up as a real, durable personal metered gateway on http://localhost:8080 — local SQLite meter, an OpenAI-compatible surface, and clean-degrade for every provider and payment feature you have not configured.

docker compose up          # builds the image, keeps the meter on a named volume
# or
make run                   # build + run the binary locally
# or
go run ./cmd/freerouter
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:8080/healthz   # -> 200

Then grow from a personal gateway toward an operated marketplace one env var at a time — storage backend, inference providers, operator economics, payment. The full walkthrough is in docs/self-host.md.

Status

Feature-complete two-sided marketplace, running end-to-end on durable storage. Metering lives in-repo (the isolated, extraction-ready metering/ library); the external forge dependency is severed — the build is reproducible off-machine. Payment-in (Polar checkout + webhook), provider payouts, the model catalog, provider self-signup, and real provider backends (DeepInfra, AWS Bedrock) are all built, behind clean-degrade config. Released as v0.3.0.

Payment go-live (real Polar credentials, real charges/payouts) and standing up a public prod deployment are externally visible / spend-committing and are reserved to the operator. The code is built and tested up to that line; flipping it live is a deliberate decision, not a default.

Architecture is locked (see CLAUDE.md and docs/design/design.md); the build program is tracked in rd.


License

freerouter is licensed under the GNU Lesser General Public License, version 2.1 — see LICENSE (SPDX-License-Identifier: LGPL-2.1-or-later).

Weak copyleft by intent: improvements to freerouter's own code flow back to everyone, but building on, integrating, or deploying it puts no license obligation on your code — no permissive rug-pull for a proprietary capture, no full-GPL reach into users.


Third Division Labs.

About

A self-hostable inference marketplace: OpenRouter without the tax, and without the center.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages