Overview
Antigravity Manager supports any client that implements OpenAI, Anthropic, or Gemini API protocols. This guide covers how to integrate custom clients, applications, and scripts.
Supported protocols
Antigravity provides three API protocol formats:
OpenAI Endpoint : /v1/chat/completionsUse for : Most third-party AI applicationsCompatibility : 99% of AI tools
Anthropic Endpoint : /v1/messagesUse for : Claude-native clientsFeatures : Full thinking mode support
Gemini Endpoint : /v1/models/*:generateContentUse for : Google AI SDK clientsFeatures : Native Gemini protocol
Basic configuration
All custom clients need three pieces of information:
Base URL
Point your client to Antigravity’s proxy: For OpenAI-compatible clients, append /v1:
API Key
Use any value if authentication is disabled: Or use your configured API key if authentication is enabled.
Model name
Choose from available models:
gemini-3-flash - Fast, cost-effective
gemini-3-pro-high - High quality
claude-sonnet-4-6 - Balanced
claude-sonnet-4-6-thinking - Extended reasoning
OpenAI-compatible clients
Configuration template
Most OpenAI-compatible clients accept these settings:
{
"baseURL" : "http://127.0.0.1:8045/v1" ,
"apiKey" : "sk-antigravity" ,
"defaultModel" : "gemini-3-flash"
}
cURL examples
Basic chat
Streaming
Image generation
curl -X POST http://127.0.0.1:8045/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"model": "gemini-3-flash",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
curl -X POST http://127.0.0.1:8045/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"model": "gemini-3-flash",
"messages": [
{"role": "user", "content": "Write a story"}
],
"stream": true
}'
curl -X POST http://127.0.0.1:8045/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"model": "gemini-3-pro-image",
"prompt": "A beautiful sunset",
"size": "1024x1024",
"quality": "hd"
}'
Anthropic/Claude clients
Configuration
{
"baseURL" : "http://127.0.0.1:8045" ,
"apiKey" : "sk-antigravity"
}
cURL example
curl -X POST http://127.0.0.1:8045/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: sk-antigravity" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'
Gemini clients
Configuration
{
"baseURL" : "http://127.0.0.1:8045" ,
"apiKey" : "sk-antigravity"
}
cURL example
curl -X POST "http://127.0.0.1:8045/v1/models/gemini-3-flash:generateContent" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"contents": [{
"parts": [{"text": "Hello!"}],
"role": "user"
}]
}'
Popular applications
LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url = "http://127.0.0.1:8045/v1" ,
api_key = "sk-antigravity" ,
model = "gemini-3-flash"
)
response = llm.invoke( "Hello!" )
print (response.content)
LlamaIndex
from llama_index.llms.openai import OpenAI
llm = OpenAI(
api_key = "sk-antigravity" ,
api_base = "http://127.0.0.1:8045/v1" ,
model = "gemini-3-flash"
)
response = llm.complete( "Hello!" )
print (response)
Continue.dev
// config.json
{
"models" : [
{
"title" : "Antigravity Gemini" ,
"provider" : "openai" ,
"model" : "gemini-3-flash" ,
"apiBase" : "http://127.0.0.1:8045/v1" ,
"apiKey" : "sk-antigravity"
}
]
}
{
"apiProvider" : "anthropic" ,
"apiKey" : "sk-antigravity" ,
"apiUrl" : "http://127.0.0.1:8045" ,
"modelId" : "claude-sonnet-4-6"
}
Authentication modes
Antigravity supports different authentication configurations:
Off (Development)
Auto (Recommended)
Strict
No authentication required: curl http://127.0.0.1:8045/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{...}'
Only use this for local development. Not recommended for production.
Automatically enables auth for LAN access: # Local (no auth needed)
curl http://127.0.0.1:8045/...
# Remote (auth required)
curl http://192.168.1.100:8045/... \
-H "Authorization: Bearer sk-your-key"
Always requires authentication: curl http://127.0.0.1:8045/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-d '{...}'
Advanced features
Model routing
Map client model names to Antigravity models:
// Antigravity model routing config
{
"mappings" : [
{
"from" : "gpt-4" ,
"to" : "gemini-3-pro-high"
},
{
"from" : "gpt-3.5-turbo" ,
"to" : "gemini-3-flash"
}
]
}
Now clients can use familiar names:
curl -X POST http://127.0.0.1:8045/v1/chat/completions \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"model": "gpt-4",
"messages": [...]
}'
# Automatically routes to gemini-3-pro-high
Session binding
For multi-turn conversations, enable session binding:
curl -X POST http://127.0.0.1:8045/v1/chat/completions \
-H "Authorization: Bearer sk-antigravity" \
-H "X-Session-ID: my-conversation-123" \
-d '{...}'
Antigravity will use the same account for all requests with this session ID.
Pass custom headers for advanced control:
Use a specific account by email
Prefer accounts of a specific tier (ultra, pro, free)
Enable sticky sessions for multi-turn conversations
Testing your integration
Test connectivity
curl http://127.0.0.1:8045/health
Expected: {"status": "ok"}
Test basic request
curl -X POST http://127.0.0.1:8045/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"model": "gemini-3-flash",
"messages": [
{"role": "user", "content": "Say hello"}
]
}'
Test streaming
curl -X POST http://127.0.0.1:8045/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-antigravity" \
-d '{
"model": "gemini-3-flash",
"messages": [{"role": "user", "content": "Count to 10"}],
"stream": true
}'
Monitor in Antigravity
Check the Monitor tab in Antigravity to see request logs and account rotation.
Troubleshooting
Common causes :
Wrong base URL (forgot /v1 for OpenAI protocol)
Invalid model name
Incorrect endpoint path
Solution : Verify endpoint matches protocol format
Common causes :
Authentication enabled but no key provided
Wrong API key
Missing Authorization header
Solution : Check auth mode in Antigravity settings
Common causes :
All accounts exhausted
Quota protection enabled
Solution : Check dashboard, refresh quotas, add more accounts
Common causes :
Antigravity proxy not running
Wrong port
Firewall blocking connection
Solution : Verify proxy is running and accessible
Best practices
Start simple : Test with cURL before integrating
Handle errors : Implement retry logic and error handling
Use streaming : For better UX with long responses
Monitor usage : Check Antigravity dashboard regularly
Configure routing : Map model names for easier migration
Enable session binding : For multi-turn conversations
Test thoroughly : Verify all features work as expected