Introduction
Antigravity Manager provides a powerful proxy server that translates multiple AI protocol formats into Google’s Gemini API, enabling seamless integration with various AI tools and frameworks.Supported Protocol Formats
The API supports three major protocol formats, allowing you to use Antigravity Manager as a drop-in replacement for:1. OpenAI Protocol
Compatible with 99% of existing AI applications that use the OpenAI API format. Base URL:http://127.0.0.1:8045/v1
Supported Endpoints:
/v1/models- List available models/v1/chat/completions- Chat completions (streaming & non-streaming)/v1/completions- Text completions/v1/responses- Codex CLI compatibility/v1/images/generations- Image generation (Imagen 3)/v1/images/edits- Image editing/v1/audio/transcriptions- Audio transcription
2. Anthropic Protocol
Native support for Claude API format, including full Claude Code CLI functionality. Base URL:http://127.0.0.1:8045
Supported Endpoints:
/v1/messages- Claude messages API/v1/messages/count_tokens- Token counting/v1/models/claude- List Claude-compatible models
- System prompts
- Thinking mode (chain-of-thought)
- Tool use and function calling
- Vision and multimodal inputs
3. Gemini Protocol
Direct access to Google’s native Gemini API format. Base URL:http://127.0.0.1:8045
Supported Endpoints:
/v1beta/models- List available models/v1beta/models/{model}- Get model info or generate content/v1beta/models/{model}/countTokens- Count tokens
API Architecture
Default Configuration
| Setting | Default Value | Description |
|---|---|---|
| Port | 8045 | HTTP server listening port |
| Host | 127.0.0.1 | Localhost only (can be changed to 0.0.0.0 for LAN) |
| Max Body Size | 100 MB | Maximum request payload size |
| Request Timeout | 300s | API request timeout (5 minutes) |
| Auth Mode | Auto | Automatic authentication mode |
Environment Variables
You can customize the server behavior using these environment variables:Health Check
The API provides health check endpoints for monitoring: Endpoints:GET /healthGET /healthz
Protocol Translation
Antigravity Manager automatically translates between different protocol formats:Request Flow
- Client Request → Incoming request in OpenAI/Anthropic/Gemini format
- Authentication → Validates API key or user token
- Model Mapping → Maps requested model to internal Gemini model
- Protocol Translation → Converts request to Gemini format
- Account Selection → Chooses optimal Google account based on quota
- Upstream Request → Forwards to Google Gemini API
- Response Translation → Converts response back to requested format
- Client Response → Returns in original protocol format
Smart Features
- Automatic Retry: Handles
429and401errors with silent account rotation - Quota Management: Tracks and respects per-model usage limits
- Session Binding: Maintains consistency across multi-turn conversations
- Thinking Mode: Supports chain-of-thought reasoning across all protocols
- Multimodal Support: Handles text, images, and audio inputs
Rate Limits
Rate limiting is handled transparently:- When an account hits quota limits, the system automatically switches to another available account
- No interruption to client requests
- Quota status is tracked in real-time and refreshed periodically
Error Handling
Standard HTTP status codes are returned:| Status Code | Description |
|---|---|
200 | Success |
400 | Bad request (invalid parameters) |
401 | Unauthorized (missing or invalid API key) |
403 | Forbidden (quota exceeded or blocked) |
404 | Not found (invalid endpoint or model) |
429 | Too many requests (rate limit exceeded) |
500 | Internal server error |
Next Steps
Authentication
Learn how to authenticate API requests
Model Routing
Configure model mappings and routing