Multi-provider routing
Route across OpenAI, Anthropic and Google Gemini through one unified, OpenAI-compatible API.
The open-source LLM gateway you run on your own infrastructure. OpenAI-compatible, compliance-grade, single container.
$ git clone github.com/ReallyArtificial/freeport && docker compose up
Run it yourself
Most gateways are someone else's cloud. freeport is a single container you deploy where your data already lives — VPC, on-prem, or air-gapped.
PII redaction, audit logging, encrypted provider keys and hard budget caps — the controls teams under GDPR, HIPAA or the EU AI Act actually need.
Requests go straight from your gateway to the model provider. No middleman sees your traffic, and there's no per-request SaaS tax.
Point any OpenAI SDK at freeport and keep your existing code. Routing, fallback and caching happen behind the same interface.
A complete gateway
Each capability below is implemented and shipping in the open-source codebase.
Route across OpenAI, Anthropic and Google Gemini through one unified, OpenAI-compatible API.
Automatic failover across providers with a circuit breaker, so one outage doesn't take you down.
Similar prompts return cached answers using local embeddings (all-MiniLM-L6-v2) — no external calls.
Per-project spend tracking with daily and monthly limits, plus an emergency kill switch.
Detect SSNs, cards, emails and phone numbers, filter content and cap tokens. Pluggable for custom rules.
Every request and response is logged with usage analytics and configurable retention.
Provider API keys are stored encrypted with AES-256-GCM in the local database.
Token-bucket rate limiter with per-key request limits to protect your providers.
Manage and version prompts externally, then split traffic between variants to compare them.
Prometheus-compatible counters and histograms for latency, cost and request volume.
A built-in Preact dashboard to add providers, set budgets, inspect logs and manage prompts.
Chat, completions, embeddings and model listing — streaming included. Any OpenAI SDK just works.
Quickstart
Two ways to start. The gateway and admin UI come up together on :4000.
$ git clone https://github.com/ReallyArtificial/freeport
$ cd freeport
$ docker compose up
$ npm install
$ npm run build:ui
$ npm run dev
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:4000/v1",
api_key="any-key",
)
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello!"}],
)
No config files required to start. Add provider keys through the admin UI at
/ui/, environment variables, or a YAML config — your choice.
Project status
freeport is the gateway described on this page. It's
open-source under the MIT license at version 1.0.0.
Every feature listed above is implemented in
src/, not roadmap. Built on Fastify v5 and better-sqlite3,
it runs on Node 20+ and ships as a single Docker container.
We also maintain mcp-jest, a testing tool for MCP servers. No usage metrics, benchmarks or testimonials are shown here because we'd rather earn them than fake them.