su-kaka/gcli2api

将 GeminiCLI 和 Antigravity 转换为 OpenAI 、GEMINI 和 Claude API 接口

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 10 minutes ago
Added to GitGenius on September 13th, 2026
Created on August 14th, 2025
Open Issues & Pull Requests: 9 (+0)
GitHub issues: Enabled
Number of forks: 1,353
Total Stargazers: 5,161 (+0)
Total Subscribers: 11 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

gcli2api is an API gateway that converts GeminiCLI and Antigravity interfaces into OpenAI, Gemini, and Claude API-compatible endpoints.

The tool solves the problem of incompatible API formats across different AI service providers. It works by accepting requests in multiple formats—OpenAI's messages structure, Gemini's contents structure, and Claude's message format—and automatically detecting and converting between them. This allows a single backend service to handle requests formatted for different AI APIs without requiring clients to know which format to use. The gateway supports multimodal input including text and images, and provides both real streaming and compatibility modes for response handling.

Developers should choose this tool if they operate services using GeminiCLI or Antigravity and need to expose them through standard API formats that client applications expect. It suits projects that want to support multiple AI backends without forcing clients to implement different integrations for each provider. The tool includes a web management console for credential management, real-time logging, and system configuration, making it practical for production deployments. It supports multiple authentication methods including Bearer tokens, API key headers, and URL parameters, with separate password management for API endpoints and the control panel.

The project maintains active development across multiple deployment environments with documented setup procedures for Termux, Windows, Linux, macOS, and Docker. The codebase includes sophisticated credential management with automatic rotation of multiple Google OAuth credentials, load balancing for concurrent requests, and automatic fault detection that disables failing credentials. The tool implements real-time credential health monitoring with error code tracking and configurable auto-ban mechanisms. Development activity shows attention to production concerns like response optimization for thinking chain content separation, timeout handling for async tasks, and mobile-responsive interface design for the management console.