GeminiCLI to API exposes multi-format endpoints (OpenAI, Gemini, Claude, Antigravity) with flexible authentication, optional MongoDB storage, and Docker/compose deployment. README provides extensive API examples and config options.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
GeminiCLI to API converts GeminiCLI and Antigravity into API interfaces compatible with OpenAI, GEMINI, and Claude. The repository is a Python project with Docker support and a web/API layer that unifies multiple model formats and authentication methods.
How it works
The project exposes endpoints for OpenAI-compatible chat completions, Gemini native model generation (both standard and streaming), Claude API format, and Antigravity endpoints in OpenAI/Gemini/Claude formats. It includes automatic format detection and conversion between formats and supports multiple authentication mechanisms (Bearer token, x-goog-api-key, URL param key). It also provides a web admin console for credential management and system configuration, plus a credential/token health monitoring system and streaming responses.
Getting started
Install and run via Docker or local scripts. Key deployment/import paths include:
- Docker run examples for both general and password-specific setups
- docker-compose.yml snippets for a MongoDB-backed deployment
- Local install instructions and environment variable guidance for MongoDB and credentials
Read the README for detailed commands:
- Docker run examples (passwords and ports)
- Docker Compose example to deploy MongoDB and app with environment variables
Initial configuration and endpoints are documented in:
- OpenAI-compatible endpoint: /v1/chat/completions
- Gemini native endpoint: /v1/models and /v1/models/{model}:generateContent
- Claude endpoint: /v1/messages
- Antigravity endpoints: /antigravity/v1/... for OpenAI, Gemini, Claude formats
Configuration and environment variables cover:
- PORT and HOST
- API_PASSWORD, PASSWORD, PANEL_PASSWORD
- MONGODB_URI and MONGODB_DATABASE (MongoDB mode)
- Redis/proxy and other network-related settings are mentioned in advanced config sections
Getting started (commands from README)
Install for various environments as provided: Termux, Windows PowerShell, Linux, macOS, Docker, and Docker Compose examples are included. Specific commands are quoted in the README, for example:
- Linux initial install: ```bash
curl -o install.sh "https://raw.githubusercontent.com/su-kaka/gcli2api/refs/heads/master/install.sh" && chmod +x install.sh && ./install.sh
- Docker run (general): ```bash
docker run -d --name gcli2api --network host -e PASSWORD=pwd -e PORT=7861 -v $(pwd)/data/creds:/app/creds ghcr.io/su-kaka/gcli2api:latest
- Docker Compose example: a YAML snippet is provided and a sample startup command: ```bash
docker-compose up -d
Recent releases
RELEASES (latest 0): - none
Traction
Stars: 5026; Forks: 1333; Open issues: 8
Behind the repo
The repository links to a Docker container registry (ghcr.io/su-kaka/gcli2api:latest) and mentions deployment templates on Zeabur/Render, indicating hosted deployment options.
Caveats
License shows CNC-1.0 in badges; the README note indicates license line but the repo metadata lists license: none listed. Documentation is provided for MongoDB mode and local SQLite default storage, with explicit guidance on environment variable precedence over cred files. The README contains substantial code examples for curl, Python client usage, and config YAML for Docker Compose. The examples include specific endpoints, headers, and JSON payloads for multiple formats across OpenAI, Gemini, Claude, and Antigravity APIs.






