AIClient-2-API  by justlovemaki

Unified API proxy for multiple LLMs

created 2 weeks ago

New!

375 stars

Top 76.8% on sourcepulse

GitHubView on GitHub
Project Summary

Gemini-CLI-2-API is a Node.js-based proxy server that unifies access to various large language model APIs, including Gemini, OpenAI, and Claude, presenting them through a single, OpenAI-compatible local endpoint. It targets developers and users who need to integrate multiple LLMs into their applications or workflows without managing disparate API formats and authentication methods, offering a streamlined and flexible solution.

How It Works

The project employs a modular architecture leveraging the Adapter and Strategy design patterns. A central HTTP server handles incoming requests, identifying the target LLM provider based on configuration or request headers. It then uses provider-specific adapters and strategies to translate requests into the format expected by the backend LLM API (e.g., Gemini, OpenAI, Claude) and converts the responses back to an OpenAI-compatible format. This approach ensures seamless integration and simplifies the addition of new model providers.

Quick Start & Requirements

  • Install: Clone the repository and run npm install.
  • Prerequisites: Node.js (version >= 20.0.0). For Gemini, Google OAuth credentials are required. For Kiro API, Kiro client and OAuth credentials are needed.
  • Configuration: Create a config.json file or use command-line arguments to specify the model provider, API keys, ports, and other settings.
  • Run: Execute node src/api-server.js.
  • Documentation: README-EN

Highlighted Details

  • Supports multiple LLM providers (Gemini, OpenAI, Claude, Kimi K2, GLM-4.5) through a unified OpenAI-compatible API.
  • Bypasses official rate limits for Gemini via OAuth authorization.
  • Offers robust logging for prompts and responses, supporting audit and dataset creation.
  • Fully supports streaming responses and multimodal inputs.

Maintenance & Community

The project is actively maintained by justlovemaki. Further community interaction details are not explicitly provided in the README.

Licensing & Compatibility

The project is licensed under the GNU General Public License v3 (GPLv3). This license is copyleft, meaning derivative works must also be open-sourced under GPLv3. Commercial use or linking with closed-source applications may require careful consideration due to the GPLv3's strong copyleft provisions.

Limitations & Caveats

The project is licensed under GPLv3, which may restrict its use in proprietary software. While it supports Gemini CLI's OAuth, the original Gemini CLI's built-in command functions are not available through this proxy.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
14
Star History
477 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.