Repolode
mozilla-ai

mozilla-ai/otari

Self-hosted, OpenAI-compatible LLM gateway that routes one endpoint to 40+ providers with virtual keys, budgets, and usage tracking.

Open-source alternative to:LiteLLM

Stars
687
Forks
89
Open issues
325
Last commit
4 hours ago

What is it?

Otari sits between your applications and model providers. It authenticates requests, resolves provider credentials, checks budgets before dispatch, and records usage after each call. Provider calls are made through the any-llm library, so client code can keep using OpenAI or Anthropic-style APIs while the gateway handles the upstream provider.

Provider credentials stay on the gateway rather than in client applications. Operators issue revocable API keys scoped to users, workspaces, and models, and set spending budgets that are enforced before a request is sent. Local routing policies cover failover, weighted distribution, and learned selection between models.

Otari runs standalone with a local database such as SQLite or PostgreSQL, or as a data plane connected to otari.ai. It exposes chat completions, messages, and responses endpoints, plus a web dashboard for managing providers, keys, members, budgets, and usage. Optional services add a code sandbox, web search, MCP support, inference guardrails, and file understanding.

Key features

  • 01Exposes an OpenAI and Anthropic-compatible endpoint for 40+ providers.
  • 02Issues revocable virtual API keys scoped by user, workspace, and model.
  • 03Enforces budgets before dispatch and records usage afterwards.
  • 04Supports failover, weighting, and learned routing policies.
  • 05Offers a web dashboard for providers, keys, budgets, and usage.
  • 06Runs standalone with SQLite or PostgreSQL via Docker Compose.

Use cases

  • Giving a team one internal endpoint for multiple LLM providers without sharing provider keys.
  • Capping and tracking per-user or per-project LLM spend.
  • Adding failover between models so requests succeed when one provider is down.
  • Routing OpenAI-client applications to other providers by changing only the base URL.

Quick start

  1. 1

    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
  2. 2

    Send a chat request with the bootstrap key printed on first run

    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."}]}'

Things to know

  • The Docker quickstart uses SQLite inside the container, and data is deleted when it stops.
  • Provider calls require your own provider API keys.

Topics

FAQ

What is otari?
Self-hosted, OpenAI-compatible LLM gateway that routes one endpoint to 40+ providers with virtual keys, budgets, and usage tracking. Otari sits between your applications and model providers. It authenticates requests, resolves provider credentials, checks budgets before dispatch, and records usage after each call. Provider calls are made through the any-llm library, so client code can keep using OpenAI or Anthropic-style APIs while the gateway handles the upstream provider.
Is otari free to use? What license does it have?
otari is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is otari still maintained?
Actively maintained. The last commit to otari was on Oct 19, 2026.
What can I use otari for?
Giving a team one internal endpoint for multiple LLM providers without sharing provider keys. Capping and tracking per-user or per-project LLM spend. Adding failover between models so requests succeed when one provider is down. Routing OpenAI-client applications to other providers by changing only the base URL.
How do I install otari?
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 Send a chat request with the bootstrap key printed on first run: 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."}]}'
Where can I get otari?
The source code and installation instructions are on GitHub: https://github.com/mozilla-ai/otari

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects