su-kaka/gcli2api
将 GeminiCLI 和 Antigravity 转换为 OpenAI 、GEMINI 和 Claude API 接口
What it solves
This project provides a bridge between GeminiCLI/Antigravity and various AI API standards. It allows users to take credentials from these sources and expose them as standard OpenAI, Gemini, and Claude compatible APIs, making it easier to integrate these models into existing AI clients and applications without needing to change the client-side code.
How it works
The tool acts as an API gateway and proxy. It converts incoming requests from OpenAI, Claude, or Gemini formats into the specific requirements of the backend (GeminiCLI/Antigravity) and handles the response conversion back to the client. It includes a management system for Google OAuth credentials, supporting automatic rotation, load balancing, and health checks to ensure stability and avoid rate limits.
Who it’s for
Developers and AI enthusiasts who want to use Gemini and Claude models via standard API interfaces, or those managing multiple Google OAuth credentials to maintain high availability and reliability of their AI services.
Highlights
- Multi-API Compatibility: Supports OpenAI, Gemini native, and Claude API formats across multiple endpoints.
- Intelligent Credential Management: Features automatic rotation of multiple Google OAuth credentials, fault detection, and quota management.
- Web Management Console: A full-featured UI for managing OAuth flows, uploading credentials in bulk (JSON/ZIP), and monitoring real-time logs via WebSockets.
- Advanced Response Handling: Supports real-time streaming, "fake" streaming for compatibility, and an anti-truncation mechanism to prevent incomplete answers.
- Flexible Storage: Offers both local SQLite (default) and MongoDB for distributed cloud storage.
- Multimodal Support: Handles text and image inputs, including specialized image generation models with configurable resolutions and aspect ratios.
Related
- Project
- Project
- Project
- Project
- Project