{"name":"Otari: Self-Hosted OpenAI-Compatible LLM Gateway for 40+ Providers","description":"Otari, from Mozilla AI, is an open-source, self-hosted LLM gateway. It provides a single OpenAI-compatible endpoint to connect with over 40 model providers, offering features like virtual keys, budget enforcement, and usage tracking. This solution empowers users to manage their AI stack with greater control and flexibility.","github":"https://github.com/mozilla-ai/otari","url":"https://osrepos.com/repo/mozilla-ai-otari","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/mozilla-ai-otari","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/mozilla-ai-otari.md","json":"https://osrepos.com/repo/mozilla-ai-otari.json","topics":["ai-gateway","llm","openai-compatible","self-hosted","api-key-management","cost-tracking","llmops","python"],"keywords":["ai-gateway","llm","openai-compatible","self-hosted","api-key-management","cost-tracking","llmops","python"],"stars":null,"summary":"Otari, from Mozilla AI, is an open-source, self-hosted LLM gateway. It provides a single OpenAI-compatible endpoint to connect with over 40 model providers, offering features like virtual keys, budget enforcement, and usage tracking. This solution empowers users to manage their AI stack with greater control and flexibility.","content":"## Introduction\n\nOtari, from Mozilla AI, is an open-source, self-hosted LLM gateway designed to simplify interaction with various large language model providers. It offers a single OpenAI-compatible endpoint, allowing seamless integration with over 40 different LLM providers. Users can issue virtual API keys, enforce budgets, and track usage, gaining full control over their AI infrastructure.\n\n## Why Use Otari and Key Benefits\n\nOtari provides a robust solution for managing your LLM interactions with several compelling advantages:\n\n*   One OpenAI and Anthropic-compatible endpoint for many providers.\n*   Provider credentials stay securely behind the gateway.\n*   Revocable API keys with user, workspace, and model scope.\n*   Budget checks before spend and comprehensive usage records after settlement.\n*   Local routing policies for failover, weighting, and learned selection.\n*   Optional features including code execution, web search, multi-cloud provisioning (MCP), guardrails, and file understanding.\n\n## Installation\n\nGetting started with Otari is straightforward. You can run an ephemeral standalone gateway using Docker:\n\nbash\ndocker run --rm -p 8000:8000 \\\n  -e OTARI_MASTER_KEY=SET_A_MASTER_KEY \\\n  -e OPENAI_API_KEY=YOUR_OPENAI_KEY \\\n  -e OTARI_CONFIG_YAML='default_pricing: true' \\\n  mzdotai/otari:latest \\\n  otari serve\n\n\nFor a full-stack deployment with persistent data, including PostgreSQL, clone the repository and use Docker Compose:\n\nbash\ngit clone https://github.com/mozilla-ai/otari\ncd otari\ncp config.example.yml config.yml\n# Set a master key, provider credentials, and pricing in config.yml.\ndocker compose pull\ndocker compose up -d\n\n\nThe dashboard will be accessible at `http://localhost:8000/`. Optional services like code sandbox, web search, and guardrails can be enabled via Docker Compose profiles.\n\n## Examples\n\nOnce Otari is running, you can send requests using the generated bootstrap API key. OpenAI clients can also be configured by setting `base_url` to `http://localhost:8000/v1`.\n\nHere's an example using `curl` to send a chat completion request:\n\nbash\ncurl http://localhost:8000/v1/chat/completions \\\n  -H \"Authorization: Bearer gw-...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"openai:gpt-4o-mini\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Say hello.\"}]\n  }'\n\n\n## Links\n\nExplore Otari further through these official resources:\n\n*   GitHub Repository: [https://github.com/mozilla-ai/otari](https://github.com/mozilla-ai/otari){:target=\"_blank\"}\n*   Official Website: [https://otari.ai](https://otari.ai){:target=\"_blank\"}\n*   Documentation: [https://otari.ai/docs](https://otari.ai/docs){:target=\"_blank\"}\n*   Launch Blog: [https://blog.mozilla.ai/otari-own-your-ai-stack/](https://blog.mozilla.ai/otari-own-your-ai-stack/){:target=\"_blank\"}\n*   Discord Community: [https://discord.gg/ZfZPfTdtSe](https://discord.gg/ZfZPfTdtSe){:target=\"_blank\"}","metrics":{"detailViews":0,"githubClicks":1},"dates":{"published":null,"modified":"2026-09-04T20:23:53.000Z"}}