GeminiCLI and Antigravity, repackaged as REST APIs
A compatibility layer that exposes GeminiCLI and Antigravity through OpenAI, Gemini-native, and Claude API endpoints.

What it does gcli2api is a Python gateway that sits between your applications and Google’s GeminiCLI and Antigravity services. It translates requests and responses into OpenAI-compatible, Gemini-native, and Claude API formats, letting standard LLM clients talk to Google’s infrastructure without modification. The project bundles a web management console for OAuth flows, credential file uploads, and real-time log monitoring.
The interesting bit This is fundamentally an adapter, though the built-in credential management elevates it well above a simple proxy. It maintains a pool of Google OAuth credentials, automatically rotates them under the hood, load-balances requests, and disables accounts that hit errors like 429 or 403. It also separates “thinking” content from final answers and supports model variants for image generation with resolution and aspect-ratio suffixes.
Key highlights
- Multi-format API facade: exposes OpenAI (
/v1/chat/completions), Gemini native (/v1/models/...:generateContent), and Claude (/v1/messages) endpoints, plus Antigravity-specific prefixes - Credential rotation and fault tolerance: multiple OAuth files with automatic failover, error tracking, and per-credential quotas (the README states each credential file provides 1000 request额度)
- Web admin panel: OAuth flow management, bulk ZIP upload for credentials, real-time WebSocket log streaming, and separate management for GCLI and Antigravity credentials
- Storage flexibility: defaults to local SQLite, but can switch to MongoDB for distributed deployments
- Model suffix system: append modifiers for thinking budgets, search integration, image generation resolution/aspect ratios, fake streaming, or anti-truncation retries
Caveats
- The README is truncated in the provided sources, cutting off MongoDB configuration details and other sections mid-sentence
- You must obtain your own Google OAuth credentials through the web panel; it does not eliminate the need for valid GeminiCLI or Antigravity authorization files
- The default password is openly documented as
pwd, so you’ll want to override that via environment variables
Verdict Worth a look if you are already using GeminiCLI or Antigravity and want to plug them into existing OpenAI or Claude client workflows. Skip it if you are seeking a generic, provider-agnostic LLM gateway that does not require managing Google OAuth credential files.
Frequently asked
- What is su-kaka/gcli2api?
- A compatibility layer that exposes GeminiCLI and Antigravity through OpenAI, Gemini-native, and Claude API endpoints.
- Is gcli2api open source?
- Yes — su-kaka/gcli2api is an open-source project tracked on heatdrop.
- What language is gcli2api written in?
- su-kaka/gcli2api is primarily written in Python.
- How popular is gcli2api?
- su-kaka/gcli2api has 5k stars on GitHub.
- Where can I find gcli2api?
- su-kaka/gcli2api is on GitHub at https://github.com/su-kaka/gcli2api.