mozilla-ai/otari

▲ 46 stars today★ 654⑂ 83

Open-source, OpenAI-compatible LLM gateway you run yourself. One endpoint for 40+ providers, with virtual keys, budgets, and usage tracking.

About mozilla-ai/otari

mozilla-ai/otari is an open-source project on GitHub, mainly written in Python. Open-source, OpenAI-compatible LLM gateway you run yourself. One endpoint for 40+ providers, with virtual keys, budgets, and usage tracking. It currently holds 654 stars and 83 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #44 with 46 new stars today.

GitHub Repository Details

Repository mozilla-ai/otari · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

https://github.com/mozilla-ai/otari/blob/HEAD/Otari logo

An OpenAI-compatible LLM gateway you own and run.

Route one endpoint to 40+ providers, issue virtual keys, enforce budgets, and track usage.

Tests Lint Typecheck Docker Python 3.13+

Docs · otari.ai · Launch blog · Discord

https://github.com/mozilla-ai/otari/blob/HEAD/Otari dashboard tour: spend overview, usage by model, a request rescued by a routing fallback, two models compared in the Playground, the model catalog, routing policies, API keys, members, budgets, and providers

Otari sits between your applications and model providers. It authenticates requests, resolves provider credentials, enforces budgets before dispatch, and records usage afterwards. Provider calls go through any-llm.

Run Otari standalone with your own database and provider keys, or connect a data plane to otari.ai.

Why Otari

Quickstart

Run an ephemeral standalone gateway with Docker:

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

On the first empty database, Otari creates an API key and prints it once:

No API keys found. Created bootstrap key for first run. Save this key now:
tk-...

Send a request with that key:

curl http://localhost:8000/api/v1/chat/completions \
  -H "Authorization: Bearer tk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai:gpt-4o-mini",
    "messages": [{"role": "user", "content": "Say hello."}]
  }'

OpenAI clients work by setting base_url to http://localhost:8000/api/v1.

This container uses SQLite inside the container and is deleted when it stops. Use the Compose setup below for persistent data.

The command a developer runs next to a coding agent (otari hook, otari import claude-code) installs on its own, without the server:

brew install mozilla-ai/tap/otari

See Agent Guardrails and Use with Claude Code.

Run the full stack

git clone https://github.com/mozilla-ai/otari
cd otari
cp config.example.yml config.yml

Set a master key, provider credentials, and pricing in config.yml.

Provider copies of attached files need a pepper of their own. Compose reads .env.

grep -qs OTARI_PROVIDER_ACCOUNT_PEPPER .env || echo "OTARI_PROVIDER_ACCOUNT_PEPPER=$(openssl rand -base64 32)" >> .env docker compose pull docker compose up -d

Compose runs Otari with PostgreSQL. Optional profiles add the code sandbox, web search, and guardrail services:

docker compose --profile code-exec --profile web-search --profile guardrails up -d

The dashboard is served at http://localhost:8000/. To store provider keys through the dashboard, set OTARI_SECRET_KEY to a Fernet key generated by otari gen-secret-key.

A one-click deployment template is available for Railway.

Runtime modes

| Mode | Purpose | | --- | --- | | Standalone | One process serves management and inference using local storage. | | Hosted | A multi-tenant control plane; inference runs on connected gateways. | | Hybrid | A data-plane gateway resolves credentials and reports usage to otari.ai. |

When OTARI_MODE is unset, OTARI_AI_TOKEN selects hybrid mode; otherwise Otari defaults to standalone. A mode says what a process serves, not who runs it, so "hosted" is not the opposite of "self-hosted". See Runtime modes.

API and dashboard

The core completion routes are:

Standalone also serves the broader OpenAI-compatible and management APIs. The running server publishes Swagger UI at /api/v1/docs and OpenAPI at /api/v1/openapi.json. See API reference.

The dashboard manages providers, models, routing, tools, keys, members, budgets, settings, activity, and usage. Its navigation adapts to the deployment mode and the signed-in person's authority. See Admin dashboard.

Development

git clone https://github.com/mozilla-ai/otari
cd otari
uv sync --dev
cp config.example.yml config.yml
uv run otari serve --config config.yml

For local development without PostgreSQL, change database_url to sqlite+aiosqlite:///./otari.db.

Common checks:

make test
make lint
make typecheck

See CONTRIBUTING.md before opening a pull request.

Documentation

License

Apache 2.0. See LICENSE.

GitHub Stars & Activity

654Stars
83Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars654
Forks83
Open issues0
Primary languagePython
License-
Stars gained today46
Created-
Last pushed-

Trending History

Daily boardrank #44 · ▲ 46 stars

Related AI Projects

1

NousResearch / hermes-agent

Python★ 254,906⑂ 0
→
2

Comfy-Org / ComfyUI

Python★ 138,488⑂ 16,491▲ 155 stars
→
3

Graphify-Labs / graphify

Python★ 128,304⑂ 12,369▲ 592 stars
→
4

TauricResearch / TradingAgents

Python★ 111,884⑂ 21,603▲ 242 stars
→
5

debpalash / VoiceStudio

Python★ 74,900⑂ 8,196▲ 2,098 stars
→
6

HKUDS / CLI-Anything

Python★ 54,499⑂ 4,937▲ 582 stars
→
7

K-Dense-AI / scientific-agent-skills

Python★ 52,629⑂ 4,665▲ 672 stars
→
8

MadsLorentzen / ai-job-search

Python★ 52,548⑂ 17,253▲ 2,213 stars
→

More AI Rankings