Antigravity CLI (agy) with a custom Gemini endpoint

I run qcode.cc, an independent API service (not official Anthropic, OpenAI or Google). The examples use QCode paths; swap the host for any compatible gateway.

What agy accepts

Config

Base URL without /v1beta (the client appends it):

export GOOGLE_GEMINI_BASE_URL="https://api.qcode.cc/gemini"
export GEMINI_API_KEY="cr_your_key"

~/.gemini/antigravity-cli/settings.json (Windows: %USERPROFILE%\.gemini\antigravity-cli\settings.json):

{
  "modelProvider": "gemini",
  "model": "Gemini 4 Neon (High)"
}

Use the display name exactly. Gemini 4 Neon (Medium), (XHigh) and (Low) also work; they map to /gemini/v1beta/models/gemini-4-neon:streamGenerateContent.

Troubleshooting

SymptomCauseFix
404 on the first requestmodel missing, or the raw id gemini-4-neon used. agy falls back to a default Gemini preview model that the endpoint does not serve.Set "model": "Gemini 4 Neon (High)" together with "modelProvider": "gemini".
404 with /v1beta/v1beta in the URL/v1beta was put on the Base URL.End the Base URL at /gemini.
401Key not read.Export GEMINI_API_KEY (not GOOGLE_API_KEY) and open a new terminal.
Want Claude or GPT in agyNot possible through agy's custom endpoint.Use Claude Code for Claude and Codex CLI for GPT; the same cr_ key works on their paths.

One-command setup for agy, Claude Code and Codex: one-click install. Full page: docs.qcode.cc Antigravity CLI. Gemini CLI personal and Pro login plans stopped on 2026-06-18 (Google's announcement); an API-key setup like the one above is unaffected. More: Gemini setup overview.

Facts checked against docs.qcode.cc on 2026-12-05. I run qcode.cc. Pricing: qcode.cc/pricing (no free quota). Contact: hi@qcode.cc.