Skip to main content

Overview

Antigravity Manager is compatible with official Python SDKs from OpenAI, Anthropic, and Google, allowing you to use familiar APIs with multi-account management and automatic quota rotation.

Installation

Install the SDK you want to use:

OpenAI SDK

Basic chat completion

Streaming responses

Image generation

Multi-modal input

Anthropic SDK

Basic message

Streaming messages

Extended thinking

Tool use

Google Generative AI SDK

The Google SDK requires configuring a custom HTTP client to use Antigravity’s proxy.

Basic generation

Streaming

Environment variables

For easier configuration, use environment variables:
Then in Python:

Error handling

Best practices

Use streaming

Enable streaming for long responses to improve perceived performance

Handle errors gracefully

Implement retry logic and error handling for production use

Monitor quotas

Regularly check Antigravity dashboard for account status

Set appropriate limits

Configure max_tokens based on your use case to avoid unnecessary quota consumption

Complete examples

Chatbot with history

Batch image generation

Troubleshooting

Verify Antigravity proxy is running:
Check authentication settings in Antigravity API Proxy tab. If enabled, use the actual API key.
Verify model name matches those available in Antigravity. Check the dashboard for active models.
All accounts may be exhausted. Check Antigravity dashboard and refresh account quotas.