How to Use Free Antigravity AI Models in Claude Code

Suraj Satheesh
Suraj Satheesh

• 5 min read

AI setup tutorial

claude

antigravity

Updated

Table of Contents

AI development tools are evolving fast, but sometimes access to the most powerful models is gated behind expensive APIs or restricted platforms. That’s exactly what antigravity-claude-proxy, an open-source project by Badri Narayanan S, enables. It masterfully links Google’s Antigravity with Anthropic’s Claude Code, letting you run Claude models powered by your Antigravity tokens in Claude Code.

These models are technically free to use as a part of Antigravity public preview.

Why Claude Code Instead of Using Antigravity or Other AI-powered IDEs Directly?

With so many AI tools available, I wonder, why use Claude Code at all? It all comes down to workflow depth over raw model access.

Claude Code isn’t just an AI chat or autocomplete tool. It’s a coding agent designed to understand entire repositories, reason across multiple files, and execute multi-step development tasks. It fits naturally into real developer workflows such as version control (Git), CLI, scripts, instead of being locked to a specific editor.

Most AI-based IDEs and copilots focus on:

  • Inline suggestions
  • Editor-specific integrations
  • Limited project context

Claude Code, on the other hand:

  • Works independently of your editor
  • Understands full codebases
  • Acts more like a pair-programmer than a helper (has Agency)

What is antigravity-claude-proxy?

antigravity-claude-proxy is a lightweight proxy server that exposes AI models provided by Google Antigravity’s Cloud Code behind an Anthropic compatible API.

You can use Antigravity's Claude and Gemini models (including their “thinking” modes) with tools like Claude Code CLI without paying for a dedicated Claude Code plan.

How It Works

Here’s the architecture in 3 steps:

internal working of antigravity claude code proxy

Behind the scenes, the proxy:

  1. Receives Claude Code requests (Anthropic messaging API).
  2. Transforms them to Google Generative AI API format.
  3. Sends them through Antigravity’s Cloud Code with OAuth tokens.
  4. Converts responses back to Anthropic format with stream support.

So you get end-to-end Claude or Gemini results without dealing with API discrepancies yourself.

Google One Plan subscribers can get benefit from more generous rate limits for the Claude models. Even the free version works. Refer to Antigravity's Pricing for more details. Also, students who have claimed a free Google One subscription, as well as Jio users in India who are now provided with free Google AI Pro subscription, can use antigravity at no cost.

Installation and Setup

That being said, let me walk you through the installation and setup of antigravity-claude-proxy.

Prerequisites

  • Node.js 18 or later
  • HomeBrew for macOS/Linux
  • Antigravity installed (for single-account mode) OR Google account(s) for multi-account mode

antigravity-claude-proxy

1] Open the terminal of your choice and run:

npm install -g antigravity-claude-proxy

2] Once the command is executed, ensure you are logged into your Google account within antigravity IDE.

Alternatively, you can load balance by adding one or more Google accounts using OAuth. For that run this command:

antigravity-claude-proxy accounts add

This opens a browser tab for Google OAuth. Sign in and authorize access. Repeat for multiple accounts.

Pro Tip

# List all accounts
antigravity-claude-proxy accounts list

# Verify accounts are working
antigravity-claude-proxy accounts verify

# Interactive account management
antigravity-claude-proxy accounts

This method benefits users without a Google One subscription by allowing them to switch between different accounts once they reach their daily quota.

3] The next step after installing and logging into Google account is to start the proxy using the below command:

antigravity-claude-proxy start

CAUTION

Remember to run antigravity-claude-proxy start (starts the proxy server) before using Claude Code.

The server runs on port 8080 (http://localhost:8080) by default.

To check whether the server is working or not, run the below command in the terminal or hit the URL directly in the browser.

curl http://localhost:8080/health

Also, to check your account status or daily quota run this command:

curl "http://localhost:8080/account-limits?format=table"

Claude Code

After setting up antigravity-claude-proxy, now it’s time to install Claude Code.

CAUTION

If you’re already logged into Claude Code with another account, you need to clear that existing Claude Code authentication so the proxy setup works correctly. Run claude and type /logout. After logging out, go through the second step mentioned below.

1] Install Claude Code, and run the following command in your terminal:

For macOS/Linux (using Homebrew):

brew install --cask claude-code

For Windows:

irm https://claude.ai/install.ps1 | iex

2] Check if you have a settings.json file for Claude Code at the locations mentioned below. If you do, just edit the settings.json, and if not, create one.

  • macOS/Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json

Add this configuration to settings.json file:

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "test",
    "ANTHROPIC_BASE_URL": "http://localhost:8080",
    "ANTHROPIC_MODEL": "claude-opus-4-5-thinking",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-thinking",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5-thinking",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-5",
    "CLAUDE_CODE_SUBAGENT_MODEL": "claude-sonnet-4-5-thinking"
  }
}

3] After creating/editing the settings.json file, next step is to load environment variables.

Add the proxy settings to your shell profile:

For macOS / Linux:

echo 'export ANTHROPIC_BASE_URL="http://localhost:8080"' >> ~/.zshrc
echo 'export ANTHROPIC_API_KEY="test"' >> ~/.zshrc
source ~/.zshrc # replace with `~/.bashrc` if you are using Bash

For Windows:

  • PowerShell:
Add-Content $PROFILE "`n`$env:ANTHROPIC_BASE_URL = 'http://localhost:8080'"
Add-Content $PROFILE "`$env:ANTHROPIC_API_KEY = 'test'"
. $PROFILE
  • Command Prompt (CMD):
setx ANTHROPIC_BASE_URL "http://localhost:8080"
setx ANTHROPIC_API_KEY "test"

Restart the terminal for changes to take effect.

4] Before running Claude Code, make sure you add the following in the claude.json file (macOS/Linux: ~/.claude.json, Windows: %USERPROFILE%\.claude.json):

"hasCompletedOnboarding": true

Then, start the proxy server and run claude code:

antigravity-claude-proxy start # Make sure the proxy is running first
claude # In another terminal, run Claude Code

To manage models in Claude Code just type /model and you can switch between different Claude models.

Conclusion

For developers who love experimenting, building side projects, or exploring AI assisted coding without committing to expensive subscriptions, antigravity-claude-proxy is a game changer. It demonstrates how thoughtful engineering and open-source collaboration can unlock hidden potential in existing platforms. Projects like antigravity-claude-proxy are shaping a more open and accessible future for AI development.

That said, it’s important to use this tool responsibly and understand the terms of service, avoid production misuse, and treat it as a development and learning aid rather than a commercial dependency.


React2Shell Vulnerabilities — What to do?

Previous