selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Otari logo

Self-host Otari

v0.33.0

OpenAI-compatible LLM gateway for multi-provider routing

BetaOpen SourceApache-2.0
Updated10 hours ago
LanguagePython
Setup difficultyModerate
Stars
746
Port
8000 (HTTP API and dashboard)
Requires
PostgreSQL
Docker
mzdotai/otari
Install with Docker

What is Otari?

Otari is an LLM gateway from Mozilla.ai that sits between applications and model providers. It routes requests to 40+ providers through a unified OpenAI-compatible endpoint, manages provider credentials securely behind the gateway, issues revocable virtual API keys with user/workspace/model scope, enforces budgets before requests are dispatched, and records usage after settlement. It supports local routing policies for failover, weighted selection, and learned routing. Optional features include sandboxed code execution, web search, MCP integration, inference guardrails like prompt-injection detection, and file understanding for local models. The gateway is deployed via Docker or Docker Compose with PostgreSQL for production, and includes a web dashboard for managing providers, models, routing, keys, members, budgets, and observability. The CLI tool (installable via Homebrew) adds agent guardrails for coding agents like Claude Code without requiring the server.

Should you self-host Otari?

Otari scores 56/100 on selfhost.directory (how scoring works) and ranks #14 of 39 in API Gateway. It has 746 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v0.33.0, came out on 27 October 2026. New versions land roughly every 1 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 311 stars). It scores higher overall, so compare the two before you pick. See Otari vs Kong Gateway side by side.

Features

  • Admin Dashboard
  • Agent guardrailsCLI-only feature, no server required
  • Anthropic-compatible API
  • Budget Enforcement
  • Code ExecutionOptional via Docker Compose profile
  • File understanding
  • Inference guardrailsOptional via Docker Compose profile
  • MCP (Model Context Protocol)
  • OpenAI Compatible API
  • Prometheus MetricsRequires metrics extra (included in Docker image)
  • Rate Limiting
  • Routing policies
  • Virtual API keys
  • Web SearchOptional via Docker Compose profile

Otari README

How to install Otari

Install Otari with Docker

Environment variables
OTARI_MASTER_KEY, OPENAI_API_KEY, OTARI_CONFIG_YAML

docker run --rm -p 8000:8000
-e OTARI_MASTER_KEY=SET_A_MASTER_KEY
-e OPENAI_API_KEY=YOUR_OPENAI_KEY
-e OTARI_CONFIG_YAML=' default_pricing: true providers: openai: api_key: ${OPENAI_API_KEY} '
mzdotai/otari:latest
otari serve

Ephemeral gateway with SQLite, data lost on stop

Otari releases & version history

More in API Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…