About this project

AI Gateway is an open-source tool designed to simplify access to multiple large language model (LLM) providers through a single, unified API. It supports routing requests across providers like OpenAI, Gemini, Groq, Mistral, and more — including local models via Ollama or mock responses for testing. Key features include automatic retries, fallback chains, rate limiting, and most notably, hard monthly budget caps that block further spending once a set limit is reached. The system includes a plain-English cost dashboard showing current usage and projections. Installation is streamlined via Docker Compose with optional simple mode (SQLite, no Redis) or full stack (Postgres + Redis). A Python client offers both synchronous and asynchronous interfaces. Security defaults disable demo keys and mock providers in production unless explicitly allowed. Ideal for solo developers and students who want LiteLLM-style flexibility without enterprise complexity.