Antigravity CLI (Gemini)
Google agy native Gemini CLI only; not IDE/App inference or another extension.
Manual setup
1. Check agy --version. Back up and merge {"modelProvider":"gemini"} into ~/.gemini/antigravity-cli/settings.json (Windows: %USERPROFILE%\.gemini\antigravity-cli\settings.json). Record the previous value; preserve Google login and other preferences.
2. Enter ZRELAY_API_KEY privately. In this session map it to GEMINI_API_KEY and set GOOGLE_GEMINI_BASE_URL=https://api.zrelay.net, without /v1 or /v1beta. PowerShell uses $env:GEMINI_API_KEY=$env:ZRELAY_API_KEY and $env:GOOGLE_GEMINI_BASE_URL="https://api.zrelay.net".
3. Run agy models. Select the exact Gemini 3.7 Flash identifier listed by the installed version, for example agy --model gemini-3.7-flash-low only if listed. Confirm Gemini API key mode and stop on fallback. The gateway route model is gemini-3.7-flash in Prime; -low is a client selector.
4. Inspect settings and selection without sending a prompt. Removing modelProvider restores normal authentication. If the model is absent, do not guess aliases: check the installed customModelsConfig schema or choose another guide.
Configuration and commands
{"modelProvider":"gemini"}export GEMINI_API_KEY="$ZRELAY_API_KEY"
export GOOGLE_GEMINI_BASE_URL="https://api.zrelay.net"
agy modelsAlternative: ask an AI assistant
Copy this complete prompt into your coding assistant. It describes configuration work; installation and paid tests need your authorization.
Configure Google Antigravity CLI (agy) for Zrelay's native Gemini API, not its editor agent or another coding extension. Detect OS, shell and installed version. Read https://antigravity.google/docs/install, https://antigravity.google/docs/settings, https://antigravity.google/schemas/v1/settings.json and https://keys.zrelay.net/api/catalog. Require an enabled native Gemini route and matching key pool; gemini-3.7-flash in Prime is the current example. Preserve all existing settings and Google credentials. Back up settings privately and merge only modelProvider="gemini" into the documented CLI settings file. Record how to restore the previous value. Never request, read out, print or include a real key in chat, files, commands or logs. Have me enter it locally; use process environment GEMINI_API_KEY from ZRELAY_API_KEY and GOOGLE_GEMINI_BASE_URL=https://api.zrelay.net. Inspect agy models and select its exact Gemini 3.7 Flash identifier; stop on model fallback. Validate JSON, environment presence without values, CLI version and selected model without paid inference. Explain the catalog's 4096 output limit; do not invent an output-token setting or confuse maxTokens with output length. Ask explicit consent before installation or any inference request. Report precisely what was inspected and what remains untested.Limits and verification
Native Gemini unary/streaming routes are listed, but the actual emitted header/path and tool loop were not captured. The gateway accepts x-goog-api-key, not query ?key=. Output maximum is 4096; agy has no established output-limit setting, and customModel.maxTokens means context. This cannot be extrapolated to Antigravity IDE/App.
These recipes were reviewed against documentation and public catalog data. No client installation, authenticated request, paid inference, streaming or tool loop was executed. Validate configuration first; a later short text test does not establish complete agent compatibility.
Recheck the live catalog and your key’s provider/pool. The reviewed examples have 128000 input and 4096 output maxima unless a client limitation above prevents controlling the request. Never print, log or commit credentials.
Official sources
Documentation checked 2026-11-09; mutable sources can differ from your installed version.
https://antigravity.google/docs/install
https://antigravity.google/docs/settings
https://antigravity.google/schemas/v1/settings.json
https://keys.zrelay.net/api/catalog
https://antigravity.google/docs/cli/reference/
https://antigravity.google/docs/marketplace
Questions about your integration? support@zrelay.net