Photo by Artem Sapegin on Unsplash
Running local AI assistants and agents often requires bridging local workflows with powerful remote models. If you have a Google Gemini-Pro consumer subscription and want to route it through local tools like Claude Code or standard OpenAI SDKs, you can set up a local reverse proxy.
This guide walks you through the step-by-step technical process to install the Antigravity CLI, authenticate your subscription, and deploy a lightweight reverse proxy using Bun on Windows.
Why Use a Local Reverse Proxy for Gemini Pro?
Direct API calls to Gemini Pro typically require Google AI Studio keys. However, consumer subscriptions (such as Gemini Advanced) operate under different authentication mechanisms. By utilizing the Antigravity CLI and a local reverse proxy, you can:
* Leverage Consumer Subscriptions: Use your existing subscription without paying for extra API tokens.
* Standardize Interfaces: Expose Gemini Pro as an OpenAI or Anthropic-compatible endpoint.
* Seamless Tool Integration: Run advanced terminal agents like Claude Code directly against your local proxy.
Step 1: Install Node.js and Bun on Windows
To run the proxy server, you need Node.js and Bun installed on your Windows machine.
Installing Node.js & npx
- Go to nodejs.org and download the Windows LTS installer.
- Run the installer and keep the default settings.
- Verify the installation in Git Bash or PowerShell:
bash
node -v
npm -v
npx -v
Installing Bun
Bun is a fast, all-in-one JavaScript runtime. Install it on Windows using PowerShell:
powershell -c "irm bun.sh/install.ps1 | iex"
Verify the installation:
bun -v
Step 2: Install and Authenticate the Antigravity CLI
The Antigravity CLI is Google’s agent-first interface.
Installing the CLI
Install the official @google/antigravity-cli globally:
npm install -g @google/antigravity-cli
Authenticating Your Account
To link your Gemini-Pro consumer subscription, authenticate the CLI:
antigravity auth login
Note: This command opens an OAuth consent screen in your default browser. Log in using the Google account associated with your active subscription.
Step 3: Run the Reverse Proxy using Bunx
Rather than cloning a repository or installing a package permanently, you can execute the proxy on-demand using bunx.
Starting the Proxy
Execute the proxy server:
bunx antigravity-claude-proxy start
By default, the proxy server will start listening on http://localhost:8080.
If you need to use a custom port, set the PORT environment variable:
PORT=3001 bunx antigravity-claude-proxy start
Verifying the Setup
Verify that the proxy is running and has successfully detected your Antigravity session:
curl http://localhost:8080/health
To view available models and account limits:
curl "http://localhost:8080/account-limits?format=table"
Step 4: Integrating with Claude Code and OpenAI SDKs
Once the proxy is running, you can configure your developer tools to point to http://localhost:8080.
Configuring Claude Code
Create or edit the Claude Code configuration file at %USERPROFILE%\.claude\settings.json and add the following:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "test",
"ANTHROPIC_BASE_URL": "http://localhost:8080",
"ANTHROPIC_MODEL": "gemini-3.1-pro-low",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-3.1-pro-low",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gemini-3.5-flash-low",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-3.5-flash-low",
"CLAUDE_CODE_SUBAGENT_MODEL": "gemini-3.5-flash-low",
"ENABLE_EXPERIMENTAL_MCP_CLI": "true"
}
}
Configuring OpenAI SDK (Python Example)
You can route standard OpenAI SDK calls to the proxy by changing the base_url:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1",
api_key="test"
)
response = client.chat.completions.create(
model="gemini-3.1-pro-low",
messages=[{"role": "user", "content": "Hello Gemini Pro!"}]
)
print(response.choices[0].message.content)
Frequently Asked Questions (FAQ)
Is this proxy secure?
Yes, the proxy runs entirely on your local machine (localhost). Your credentials and data do not leave your system, except for standard API requests sent directly to Google’s endpoints.
What models are supported?
The proxy supports all models exposed by your Antigravity subscription, including gemini-3.1-pro, gemini-3.5-flash, and Claude models depending on your plan.
Can I run multiple accounts?
Yes, the proxy supports multi-account load balancing. You can manage accounts via the web console at http://localhost:8080/ui.

