Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/badrisnarayanan/antigravity-claude-proxy/llms.txt

Use this file to discover all available pages before exploring further.

Base URL

http://localhost:8080
The default port is 8080. You can configure this via the PORT environment variable or in config.json.

API Compatibility

Antigravity Claude Proxy provides an Anthropic Messages API-compatible interface. This means you can use the proxy as a drop-in replacement for the official Anthropic API by:
  1. Setting ANTHROPIC_BASE_URL=http://localhost:8080
  2. Setting ANTHROPIC_AUTH_TOKEN=test (or any value if API key auth is disabled)
The proxy translates requests from Anthropic format → Google Generative AI format → Antigravity Cloud Code API, then converts responses back to Anthropic format.

Request/Response Format

All API requests use JSON payloads with Content-Type: application/json. Responses follow the Anthropic Messages API format:
{
  "id": "msg_01...",
  "type": "message",
  "role": "assistant",
  "content": [...],
  "model": "claude-sonnet-4-5-thinking",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 150,
    "output_tokens": 250
  }
}

Available Endpoints

Messages

Send messages to Claude or Gemini models

Models

List available models

Health

Check server and account health

Authentication

Configure API authentication

Streaming Support

The proxy supports Server-Sent Events (SSE) for streaming responses. Set stream: true in your request to receive incremental updates as the model generates its response. See the Messages endpoint for details.

Model Support

Claude Models

  • claude-opus-4-6-thinking - Extended reasoning, highest capability
  • claude-sonnet-4-5-thinking - Balanced reasoning and speed
  • claude-sonnet-4-5 - Fast, production-ready

Gemini Models

  • gemini-3.1-pro-high - Highest quality Gemini
  • gemini-3.1-pro-low - Cost-optimized Gemini
  • gemini-3-flash - Fastest Gemini model
Use GET /v1/models to see all available models in your accounts.

Error Handling

Errors follow the Anthropic API format:
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "messages is required and must be an array"
  }
}

Error Types

  • authentication_error - Invalid or missing API key (if auth is enabled)
  • invalid_request_error - Malformed request or invalid parameters
  • api_error - Upstream API error or network issue
  • not_found_error - Endpoint not found

Rate Limiting

The proxy automatically handles rate limits across multiple accounts:
  • When an account is rate-limited, the proxy switches to another available account
  • Rate limit state is tracked per model
  • Accounts are automatically re-enabled when their quota resets
You can monitor account status via the Health endpoint or the Web UI.