Skip to main content

Overview

Antigravity Manager provides seamless integration with the Claude Code CLI, allowing you to use multiple Claude accounts with automatic rotation and quota management.
The Claude Code CLI is the official command-line interface for Claude AI, supporting features like extended thinking, web search, and MCP (Model Context Protocol) tools.

Prerequisites

Antigravity Manager

Installed and running with at least one active account

Claude Code CLI

Install via: npm install -g @anthropic-ai/claude-code

Quick start

1

Start Antigravity proxy

  1. Open Antigravity Manager
  2. Navigate to API Proxy tab
  3. Enable the proxy server
  4. Verify the port (default: 8045)
2

Configure environment variables

Set the Claude CLI to use Antigravity as the API endpoint:
export ANTHROPIC_API_KEY="sk-antigravity"
export ANTHROPIC_BASE_URL="http://127.0.0.1:8045"
Add these to your ~/.bashrc or ~/.zshrc to make them permanent.
3

Launch Claude Code CLI

Simply run:
claude
The CLI will now route all requests through Antigravity Manager with automatic account rotation.

Configuration options

API Key

The ANTHROPIC_API_KEY can be any value when using Antigravity Manager. Common conventions:
  • sk-antigravity (recommended)
  • sk-any-value
  • Your actual Antigravity API key (if authentication is enabled)

Base URL

ANTHROPIC_BASE_URL
string
required
The base URL for the Antigravity proxy server.Default: http://127.0.0.1:8045Remote server: If running Antigravity on a remote machine, use:
export ANTHROPIC_BASE_URL="http://your-server:8045"

Features supported

Extended thinking

Antigravity automatically converts Claude’s thinking mode to Gemini’s thinking budget:
# Use models with thinking capabilities
claude --model claude-sonnet-4-6-thinking
The proxy will:
  1. Detect thinking mode requests
  2. Map thinking levels to budget tokens
  3. Handle protocol conversion automatically
Claude Code CLI’s web search works seamlessly through Antigravity:
# Search is automatically enabled
claude "What are the latest features in Rust 1.75?"
Antigravity will:
  • Inject Google Search tool when needed
  • Return grounding metadata with citations
  • Preserve search result formatting

MCP tools

Model Context Protocol tools are fully supported:
# Use with MCP servers
claude --mcp-config ./mcp.json
Antigravity includes fuzzy matching for MCP tool names to handle model hallucinations.

Usage examples

Basic conversation

# Interactive mode
claude

# Single prompt
claude "Explain async/await in Rust"

File operations

# Analyze a file
claude "Review this code" --files src/main.rs

# Generate code
claude "Create a web server" --output server.rs

Model selection

# Use specific model
claude --model claude-sonnet-4-6

# Use thinking model
claude --model claude-sonnet-4-6-thinking

# Via Gemini mapping (configured in Antigravity)
claude --model gemini-3-flash

Troubleshooting

Problem: Error: connect ECONNREFUSED 127.0.0.1:8045Solutions:
  1. Verify Antigravity proxy is running
  2. Check the port in API Proxy settings
  3. Ensure no firewall is blocking port 8045
  4. Try curl http://127.0.0.1:8045/health to test connectivity
Problem: 401 Unauthorized or Invalid API keySolutions:
  1. Check if authentication is enabled in Antigravity
  2. If enabled, use the actual API key from API Proxy settings
  3. Verify ANTHROPIC_API_KEY environment variable is set
  4. Try: echo $ANTHROPIC_API_KEY to confirm
Problem: 400 Bad Request with thinking modelsSolutions:
  1. Ensure you’re using Antigravity v4.1.23 or later
  2. Check that accounts have thinking-capable models
  3. Review logs in Antigravity for detailed error messages
  4. Try a non-thinking model to isolate the issue
Problem: Requests failing with quota errorsSolutions:
  1. Check account quotas in Antigravity Dashboard
  2. Manually refresh account quotas
  3. Enable Quota Protection in settings
  4. Add more accounts for rotation

Best practices

Enable quota protection

Prevent quota exhaustion by enabling automatic protection in Antigravity settings.

Use multiple accounts

Add multiple Claude accounts for better availability and load distribution.

Monitor usage

Check the Dashboard regularly to track quota consumption across accounts.

Configure model routing

Set up custom model mappings to optimize cost vs. performance.

Performance tips

  1. Local deployment: Keep Antigravity on the same machine as Claude CLI for minimal latency
  2. Batch operations: Use Claude CLI’s batch mode for multiple files
  3. Model selection: Use Flash models for quick tasks, Pro/Sonnet for complex reasoning
  4. Caching: Antigravity caches quota information to reduce API calls

Build docs developers (and LLMs) love