Mirrowel/LLM-API-Key-Proxy

Universal LLM Gateway: One API, every LLM. OpenAI/Anthropic-compatible endpoints with multi-provider translation and intelligent load-balancing.

What it solves

This project provides a universal proxy that allows users to access multiple LLM providers (such as Gemini, OpenAI, and Anthropic) through a single, standardized API endpoint. It eliminates the need to change code in existing applications by offering OpenAI and Anthropic compatible endpoints, while solving the problem of API key management, rate limiting, and provider failover.

How it works

The system consists of two main parts: a FastAPI-based API Proxy and a Resilience Library. The proxy acts as a gateway, routing requests to the appropriate backend provider based on a provider/model_name format. It uses the Resilience Library to handle intelligent API key rotation, load balancing, and automatic failover when a key encounters an error or rate limit.

Who it’s for

Developers and power users who use multiple LLM providers across various tools (like Claude Code, Cursor, or Continue) and want a centralized way to manage credentials, ensure high availability, and avoid vendor lock-in without modifying their application code.

Highlights

  • Universal Compatibility: Supports any application that allows custom OpenAI or Anthropic base URLs.
  • Built-in Resilience: Features automatic key rotation, escalating cooldowns for failing keys, and intelligent failover.
  • Multi-Provider Support: Integrates with Gemini, OpenAI, Anthropic, and any provider supported by LiteLLM, including exclusive support for Gemini CLI.
  • Interactive TUI: Includes a text-based user interface for managing API keys, OAuth credentials, and server settings.
  • Advanced Traffic Control: Offers fine-grained concurrency limits, model whitelists/blacklists, and priority-based credential selection.

Related

  • Project
  • Project
  • Project
  • Project
  • Project