by ShawTim
Zero-dependency native Gemini HTTP/2 gateway & in-process Pi extension (pi-gemini-app) connecting Gemini subscriptions to OpenAI-compatible coding agents (Codex, Pi, OpenCode) with multi-account pooling.
# Add to your Claude Code skills
git clone https://github.com/ShawTim/gemini-app2apiGuides for using ai agents skills like gemini-app2api.
Last scanned: 11/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-11-30T16:04:52.431Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}gemini-app2api is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ShawTim. Zero-dependency native Gemini HTTP/2 gateway & in-process Pi extension (pi-gemini-app) connecting Gemini subscriptions to OpenAI-compatible coding agents (Codex, Pi, OpenCode) with multi-account pooling. It has 153 GitHub stars.
Yes. gemini-app2api passed AgentsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/ShawTim/gemini-app2api" and add it to your Claude Code skills directory (see the Installation section above).
gemini-app2api is primarily written in JavaScript. It is open-source under ShawTim on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh gemini-app2api against similar tools.
No comments yet. Be the first to share your thoughts!
Your coding agents. Your Gemini subscriptions. Zero-dependency native HTTP/2.
Use your eligible Google Gemini accounts in Pi, OpenClaw, OpenCode, Claude Code, Cursor, Cline, Roo Code, Codex CLI, MCP clients, standalone Unix CLI, and OpenAI SDKs—via standalone in-process plugins/CLI (no server needed) or a self-hosted Node.js gateway with multi-account pooling and native POST /mcp.
English · 繁體中文 · 简体中文 · Quick Start · Connect Client · Models & Quota · API Reference · Operations
[!IMPORTANT] Unofficial interoperability research project. Not affiliated with or endorsed by Google. Sign in personally with your own eligible Google accounts—no credentials, tokens, or Google binaries are distributed. Read DISCLAIMER.md.

| Host | Install / Run | Sign In & Key Commands | Links & Guide |
|---|---|---|---|
| Pi / GooeyPi | pi install npm:pi-gemini-app |
/login gemini-app · /gemini-quota |
npm · Pi Packages · Guide |
| OpenClaw | openclaw plugins install openclaw-gemini-app (or npm:openclaw-gemini-app) |
openclaw models auth login --provider gemini-app · /usage |
npm · ClawHub · Guide |
| OpenCode | V2: opencode plugin add opencode-gemini-app (V1: "plugin": ["opencode-gemini-app"] in opencode.json) |
/connect (gemini-app) |
npm · Guide |
| Standalone MCP (stdio) | npx -y mcp-gemini-app |
npx -y mcp-gemini-app login · quota |
npm · Guide |
| Standalone CLI | npm i -g gemini-app-cli (or npx -y gemini-app-cli ask "...") |
gemini-app login · ask · search · --schema · --tools readonly |
npm · Guide · SKILL |
All 5 standalone packages run in-process over direct single-account Google OAuth HTTP/2 (no gateway server required; 15s PING keepalives, HTTPS_PROXY support, 256 tools, parallel multimodal image uploads, automatic Free-tier gemini-auto filtering). The standalone CLI (gemini-app-cli) is built for one-shot pipelines, CI, and bash-enabled coding agents—adding validated JSON Schema outputs (--schema), local file/image attachments (-f/-i), and an opt-in read-only workspace loop (--tools readonly with read/grep/find/ls, zero writes, zero shell execution).
Need multi-account pooling, automatic failover, sticky sessions, or an Admin console? Run the self-hosted gateway. Requires Node.js >= 22 (macOS / Linux / Windows / WSL2) or Docker Compose, plus one or more Google accounts with Gemini access (AI Studio API keys are a different service).
Node.js:
git clone https://github.com/ShawTim/gemini-app2api.git && cd gemini-app2api
npm ci --omit=dev --ignore-scripts
npm start
Docker Compose:
git clone https://github.com/ShawTim/gemini-app2api.git && cd gemini-app2api
read -r -s -p 'Admin password (>= 12 chars): ' GATEWAY_ADMIN_PASSWORD; echo
export GATEWAY_ADMIN_PASSWORD && docker compose up -d --build
read -r -s -p 'Admin password (>= 12 chars): ' GATEWAY_ADMIN_PASSWORD; echo
docker run -d --name gemini-app2api --init --restart unless-stopped \
-p 127.0.0.1:18989:18989 -p 127.0.0.1:18765:18765 \
-v gemini-gateway-state:/data \
--read-only --cap-drop ALL --security-opt no-new-privileges \
--tmpfs /tmp:rw,noexec,nosuid,size=16m \
-e GATEWAY_HOST=0.0.0.0 -e GATEWAY_CALLBACK_HOST=0.0.0.0 -e GATEWAY_ALLOW_REMOTE=1 \
-e GATEWAY_PUBLIC_ORIGIN=http://127.0.0.1:18989 -e GATEWAY_ADMIN_PASSWORD \
ghcr.io/shawtim/gemini-app2api:latest
See Operations Guide for custom ports, TLS reverse proxies, and SSH tunneling.
Finish setup in browser: Open http://127.0.0.1:18989/admin/ → Accounts → + Google sign-in → click Test to verify entitlement → API keys → Create key.
| Setting | Value |
|---|---|
| Base URL | http://127.0.0.1:18989/v1 (or http://gateway:18989/v1 inside Compose / your HTTPS proxy URL) |
| MCP Endpoint | http://127.0.0.1:18989/mcp (Streamable HTTP; toggleable in Admin Settings; stdio bridge via bin/gemini-gateway mcp) |
| API Key | Client key from API keys (authenticates both /v1/* and /mcp) |
| Models | gemini-neon (flagship Pro; gemini-argon aliases here), gemini-hydrogen (fast), gemini-flash-lite |
| Endpoints | GET /v1/models · POST /v1/chat/completions · POST /v1/responses · POST /mcp (full contract) |
curl -fsS http://127.0.0.1:18989/v1/chat/completions \
-H "Authorization: Bearer $GEMINI_GATEWAY_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gemini-neon","messages":[{"role":"user","content":"Hello!"}]}'
ask_gemini, gemini_search, and gemini_quota backed by your gateway's multi-account pool (strict JSON, one-click copyable from Admin UI):
{
"mcpServers": {
"gemini-app": {
"type": "http",
"url": "http://127.0.0.1:18989/mcp",
"headers": {
"Authorization": "Bearer ${GEMINI_GATEWAY_KEY}"
}
}
}
}
.vscode/mcp.json): use top-level "servers" instead of "mcpServers" with "type": "http".~/.codex/config.toml): use [mcp_servers.gemini_app] with url = "http://127.0.0.1:18989/mcp" and bearer_token_env_var = "GEMINI_GATEWAY_KEY".node /path/to/gemini-app2api/bin/gemini-gateway mcp with GEMINI_GATEWAY_URL + GEMINI_GATEWAY_API_KEY, or use standalone extensions/mcp.~/.codex/config.toml) — native /v1/responses + namespace tools:
model = "gemini-hydrogen" # or "gemini-neon"
model_provider = "gemini_app2api"
model_reasoning_summary = "none"
web_search = "disabled"
[model_providers.gemini_app2api]
name = "Gemini App2API"
base_url = "http://127.0.0.1:18989/v1"
env_key = "GEMINI_GATEWAY_KEY"
wire_api = "responses"
OpenAI Compatible, Base URL http://127.0.0.1:18989/v1, Model gemini-hydrogen or gemini-neon.gemini-neon / gemini-hydrogen → Override OpenAI Base URL (HTTPS tunnel required if Cursor's cloud relay is active).http://127.0.0.1:18989/v1; see examples/client.mjs and examples/client.py.| Model | Role | Native Mode | Advisory context_window |
|---|---|---|---|
gemini-neon |
Gemini 4 Neon flagship Pro reasoning & coding (gemini-argon aliases here) |
PRO (3) |
`512,000 |