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.