# Google Antigravity CLI with QCode: configuration reference and limits

The Google Antigravity desktop IDE does not support third-party endpoints today; only the command-line tool Antigravity CLI (`agy`) can be pointed at a custom endpoint over the Gemini protocol. Because QCode has taken the whole Gemini family offline for now, the configuration steps below are kept for reference only. If you want to use QCode right away, switch to a client that supports `claude-opus-5-5` or `gpt-6.2-sol`.


**Short answer**: The custom endpoint of Antigravity CLI (`agy`) accepts the Gemini protocol only (`"modelProvider": "gemini"` in `settings.json` plus the environment variables `GEMINI_API_KEY` and `GOOGLE_GEMINI_BASE_URL="https://api.qcode.cc/gemini"`), so it cannot reach Claude, GPT or Chinese models. QCode does not currently open the Gemini family on `/models` and is working on a Gemini 4 endpoint upgrade (check [qcode.cc/models](https://qcode.cc/models) for live availability); until then, these settings are kept for advance reference. Right now, the same `cr_` key works immediately with clients supporting Claude (`claude-opus-5-5`, endpoint `https://api.qcode.cc/api`) or GPT (`gpt-6.2-sol`, endpoint `https://api.qcode.cc/openai/v1`).

| Item | Details |
|---|---|
| Current status | **Pending Gemini 4 upgrade** (QCode does not currently open the Gemini family on `/models` and is working on a Gemini 4 endpoint upgrade; check `qcode.cc/models` for live availability — steps kept for advance reference) |
| Scope of support | Only the `agy` command line supports a custom Gemini endpoint; the Antigravity desktop IDE (2.0) does **not** support a custom provider |
| Config file | Windows: `%USERPROFILE%\.gemini\antigravity-cli\settings.json`; macOS / Linux: `~/.gemini/antigravity-cli/settings.json` |
| Key setting | `"modelProvider": "gemini"` (the only value the official client accepts) |
| Environment variables | `GEMINI_API_KEY="cr_your_key"` and `GOOGLE_GEMINI_BASE_URL="https://api.qcode.cc/gemini"` (no `/v1beta`) |
| Recommended alternative today | Claude: `claude-opus-5-5` (`https://api.qcode.cc/api`) · GPT: `gpt-6.2-sol` (`https://api.qcode.cc/openai/v1`) |

Checked against: Antigravity CLI 1.2.x–1.5.x official docs (auto-updater manifest 1.2.6, consulted 2026-09; updated with Google's 2026-11 launch of gemini-4-neon, gemini-4-carbon, and gemini-4-hydrogen) · this page reviewed on 2026-11-24 (no end-to-end test done before the Gemini 4 endpoint opens)


> **⚠️ Current status**: QCode does not currently open the Gemini family on `/models` and is working on a Gemini 4 endpoint upgrade (check [qcode.cc/models](https://qcode.cc/models) for live availability). Until then, the configuration below is kept for advance reference and the connectivity check for "calling Gemini through QCode" cannot pass yet. Right now, the same QCode `cr_` key works immediately in [Claude Code](/docs/getting-started/installation) (`claude-opus-5-5`) or [Codex CLI](/docs/ide/codex) / [Cline](/docs/ide/cline) / [Zed](/docs/ide/zed) (`gpt-6.2-sol`).

> **Migrating from Gemini CLI?** In its announcement of **2026-05-19**, Google stated plainly that from **2026-06-18** Gemini CLI and the Gemini Code Assist IDE extensions will stop serving **Google AI Pro and Ultra users and personal accounts without enterprise billing**; only **Google's own enterprise paid keys** (a paid Gemini / Gemini Enterprise Agent Platform API key) are exempt (note: a QCode `cr_` key is not a Google enterprise key and has nothing to do with that exemption). **Antigravity CLI and Antigravity 2.0** launched the same day, while the Antigravity desktop IDE had already shipped on **2025-11-18**. If you configured things earlier by following [Gemini CLI integration](/docs/ide/gemini), this page shows where Antigravity really stops.


- **Applies to**: Windows 10 / 11, macOS, Linux
- **Software version**: Antigravity CLI (`agy`) 1.2.x–1.5.x (closed-source Go client; based on the 2026-09 official docs and auto-updater manifest 1.2.6, plus Google's 2026-11 release of `gemini-4-neon`, `gemini-4-carbon`, and `gemini-4-hydrogen`)
- **Availability today**: QCode does not currently open the Gemini family on `/models` and is working on a Gemini 4 endpoint upgrade (check `qcode.cc/models` for live status; steps kept for advance reference)
- **Time needed**: 5–10 minutes to read and configure
- **You will need**: a computer with a working terminal; a QCode API key that starts with `cr_`



- You have confirmed that you are configuring the command-line tool **Antigravity CLI (`agy`)**, not the Antigravity desktop IDE (2.0), which does not support custom endpoints
- You know that QCode does not currently offer the Gemini family and that the `agy` steps on this page are preparation and reference only; if you want to write code right now, jump straight to the alternative clients in the last step
- You already have, or are ready to create, a QCode.cc account and an API key starting with `cr_`. No account yet? [Sign up](https://qcode.cc/en/auth/sign-up?utm_source=docs.qcode.cc&utm_medium=tut_before&utm_campaign=knowledge_base&src=docs-ide-antigravity-before) first, choose a plan on the [pricing page](https://qcode.cc/en/pricing?utm_source=docs.qcode.cc&utm_medium=tut_before&utm_campaign=knowledge_base&src=docs-ide-antigravity-before), then create the key in the [Dashboard](https://qcode.cc/en/dashboard)
- Your computer has a basic terminal (PowerShell or Windows Terminal on Windows, bash or zsh on macOS / Linux)


**Need an API key? Click to expand**

If you do not have a QCode account yet, [Sign up](https://qcode.cc/en/auth/sign-up?utm_source=docs.qcode.cc&utm_medium=tut_key_step&utm_campaign=knowledge_base&src=docs-ide-antigravity-key) first. If you prefer to pay by actual usage, buy a [Pay-as-you-go Pack](https://qcode.cc/en/pay-as-you-go?utm_source=docs.qcode.cc&utm_medium=tut_key_step&utm_campaign=knowledge_base&src=docs-ide-antigravity-key) first, then create a key in the [Dashboard](https://qcode.cc/en/dashboard) and copy the whole API key that starts with `cr_`. The same key covers every protocol QCode has launched (Anthropic, OpenAI-compatible and the image endpoints); see [Endpoints and API formats](/docs/getting-started/endpoints-and-api-paths) for the mapping. You can pay by credit/debit card (Visa / Mastercard), Apple Pay / Google Pay, or cryptocurrency — see [Payment methods](/docs/reference/payment-methods).


## Before you start: what is really supported and the three hard limits

Before you touch any configuration, check Antigravity's three product limits so you do not waste time:

1. **A custom endpoint can only speak the Gemini protocol**: the custom endpoint of Antigravity CLI is set by `GOOGLE_GEMINI_BASE_URL`, and the official troubleshooting docs state that `"gemini"` is the **only acceptable value** of the `modelProvider` field. So `agy` cannot reach OpenAI-compatible endpoints, nor Anthropic endpoints, and through QCode it cannot call Claude, GPT or Chinese models. Note that this is a **protocol limit of custom endpoints** — when you sign in to `agy` with a Google account, other model families may appear in the official model list, but those run on Google account quota and do not go through QCode.
2. **The Antigravity IDE (2.0 desktop) cannot be connected**: the desktop IDE has no official BYOK or custom-provider setting, so its built-in Agent cannot be pointed at a third-party endpoint. Reverse-engineering workarounds based on intercepting a local proxy do circulate in the community, but they are unsupported and their stability is not guaranteed, so this page does not recommend them. **Only the `agy` command line can be configured with a custom endpoint, not the desktop IDE.**
3. **It does not read `.env` and does not honour `GOOGLE_API_KEY`**: the official docs say explicitly that `agy` **does not load a `.env` file** automatically and that setting `GOOGLE_API_KEY` has no effect either; key credentials are read only from the `GEMINI_API_KEY` environment variable (exactly the opposite of the older Gemini CLI, which did load `.env`).

## Step-by-step reference setup (command-line `agy`)

These five steps cover the `agy` install, config file, environment variables, endpoint verification and the alternatives available today. Because QCode does not currently offer the Gemini family, steps 1–3 can be studied or pre-configured, step 4 has to wait for Gemini to come back before it can be tested, and step 5 is usable for your daily work right now.



### Install Antigravity CLI (`agy`)

Follow the [official install docs](https://antigravity.google/docs/cli/install) and pick the command for your operating system:

**Windows (PowerShell)**

Open Windows PowerShell or Windows Terminal (do not run `irm` in CMD) and run:

```powershell
irm https://antigravity.google/cli/install.ps1 | iex
```

By default it installs into `%LOCALAPPDATA%\agy\bin` (that is `C:\Users\<username>\AppData\Local\agy\bin`).


**Windows (CMD)**

If you use the command prompt (CMD), use the official `install.cmd` script instead:

```bat
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd
```


**macOS / Linux**

Run the official shell installer in a terminal:

```bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
```

It installs to `~/.local/bin/agy` by default.


> **A note on platform-specific flags**: the `--skip-aliases` and `--skip-path` flags mentioned on the official install page are **Windows**-only behaviour (`install.ps1` / `install.cmd` pass the flags on to `agy install`). On macOS / Linux, `install.sh` accepts only `-d, --dir <path>` and `-h, --help`; unknown flags make it exit immediately, so do not copy those two flags there.

After the install finishes, close the terminal window, open a new one and confirm that it took effect:

```bash
agy --version
```


Done right you will see: a version number such as `1.2.6` (the exact patch follows the official releases), with no "command not found" and no red error text.


**Stuck? irm is not recognised, or agy cannot be found**

- If Windows says `'irm' 不是内部或外部命令`, you opened CMD instead of PowerShell: use Windows PowerShell, or the `install.cmd` command from the Windows (CMD) tab above.
- If the install finished but `agy` cannot be found, close the current terminal completely and open a new one so `PATH` is refreshed; if it is still missing, check that `%LOCALAPPDATA%\agy\bin` on Windows, or `~/.local/bin` on macOS / Linux, has been added to the system `PATH`.




### Write `settings.json` to switch to API-key mode

By default `agy` reads the system keychain or opens a browser for Google sign-in. To switch to API-key mode, create or edit `settings.json` in the config directory with:

```json
{
  "modelProvider": "gemini"
}
```

Create the directory and write the file from the command line for your operating system (this avoids accidentally saving a `.txt` file by hand):

**Windows (PowerShell)**

The config file is `%USERPROFILE%\.gemini\antigravity-cli\settings.json` (that is `C:\Users\<username>\.gemini\antigravity-cli\settings.json`):

```powershell
$dir = "$env:USERPROFILE\.gemini\antigravity-cli"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
@'
{
  "modelProvider": "gemini"
}
'@ | Set-Content -Path "$dir\settings.json" -Encoding UTF8
```


**macOS / Linux**

The config file is `~/.gemini/antigravity-cli/settings.json`:

```bash
mkdir -p ~/.gemini/antigravity-cli
cat <<'EOF' > ~/.gemini/antigravity-cli/settings.json
{
  "modelProvider": "gemini"
}
EOF
```


According to the official docs, once `"modelProvider": "gemini"` is written, `agy` skips the Google sign-in flow and reads the `GEMINI_API_KEY` environment variable instead.

> **Important limit**: if `"modelProvider": "gemini"` is set but the `GEMINI_API_KEY` environment variable is not, **`agy` will not start at all**; you need both. Also, `agy` is a closed-source Go client, so the exact UI after skipping sign-in has not been tested before Gemini is restored; to go back to Google sign-in, just delete that field.


Done right you will see: on Windows, running `Get-Content "$env:USERPROFILE\.gemini\antigravity-cli\settings.json"` (on macOS / Linux, running `cat ~/.gemini/antigravity-cli/settings.json`) prints the full two-line JSON containing `"modelProvider": "gemini"`.


**Stuck? Saving from Notepad had no effect**

Windows Notepad saves a new file as `settings.json.txt` by default, which you cannot see while file extensions are hidden. Write the file with the PowerShell command above instead, or tick "File name extensions" in File Explorer and make sure the name is exactly `settings.json` (without `.txt`).




### Set the environment variables to point at the QCode Gemini endpoint

Next, set `GEMINI_API_KEY` to your QCode `cr_` key and point `GOOGLE_GEMINI_BASE_URL` at the QCode Gemini endpoint. First pick the domain for your network region:

**Mainland China**

Prefer the Asian nodes (Korea / Taiwan / Hong Kong are the closest) — the same `cr_` key works on all of them:

- Set `GOOGLE_GEMINI_BASE_URL` to: `https://asia.qcode.cc/gemini`


**Other regions**

Use the global main domain; users in North America / Europe can also switch to the `us` node — the same `cr_` key works on all of them:

- Global main domain: `https://api.qcode.cc/gemini`
- North America / Europe: `https://us.qcode.cc/gemini`


Then set the environment variables in your terminal for your operating system (replace `cr_your_QCode_key` with the real key; in mainland China replace `api.qcode.cc` below with `asia.qcode.cc`):

**Windows (PowerShell)**

Temporary, for the current window only:

```powershell
$env:GEMINI_API_KEY = "cr_your_QCode_key"
$env:GOOGLE_GEMINI_BASE_URL = "https://api.qcode.cc/gemini"
```

To persist them as user-level environment variables (reopen PowerShell afterwards):

```powershell
[System.Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "cr_your_QCode_key", [System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable("GOOGLE_GEMINI_BASE_URL", "https://api.qcode.cc/gemini", [System.EnvironmentVariableTarget]::User)
```


**macOS / Linux (bash / zsh)**

For the current terminal session:

```bash
export GEMINI_API_KEY="cr_your_QCode_key"
export GOOGLE_GEMINI_BASE_URL="https://api.qcode.cc/gemini"
```

To persist them, append the two lines above to `~/.zshrc` or `~/.bashrc`, then run `source ~/.zshrc` (or `source ~/.bashrc`).


Three rules matter in this step:

- **Stop the address at `/gemini` — no `/v1beta`, no trailing slash**: the official example gives a bare address (`https://your-endpoint.example.com`), and the version segment and request path are joined by the client itself. Because `agy` is a closed-source Go client, the official docs neither document the joining rules nor say whether an extra trailing `/` is normalised, so fill in exactly `https://api.qcode.cc/gemini` (this is the opposite of OpenCode's `google` provider, which needs `/v1beta`; see [Endpoints and API formats](/docs/getting-started/endpoints-and-api-paths)).
- **Do not put it in `.env` or `GOOGLE_API_KEY`**: `agy` does not load `.env` and ignores `GOOGLE_API_KEY`; it only reads the `GEMINI_API_KEY` environment variable.
- **`/logout` does nothing in this mode**: with `GEMINI_API_KEY` there is no stored sign-in session to clear, so `/logout` doing nothing is expected behaviour.


Done right you will see: running `echo $env:GOOGLE_GEMINI_BASE_URL` in PowerShell (on macOS / Linux, running `echo "$GOOGLE_GEMINI_BASE_URL"`) prints exactly `https://api.qcode.cc/gemini` or `https://asia.qcode.cc/gemini`, with no `/v1beta` and no trailing slash. When checking, be careful not to print your key in plain text on a shared screen.


**Need an API key?**

If you do not have a QCode account yet, [Sign up](https://qcode.cc/en/auth/sign-up?utm_source=docs.qcode.cc&utm_medium=tut_key_step&utm_campaign=knowledge_base&src=docs-ide-antigravity-key) first. If you prefer to pay by actual calls, buy a [Pay-as-you-go Pack](https://qcode.cc/en/pay-as-you-go?utm_source=docs.qcode.cc&utm_medium=tut_key_step&utm_campaign=knowledge_base&src=docs-ide-antigravity-key) first, then create a key in the [Dashboard](https://qcode.cc/en/dashboard) and copy the whole `cr_` string. You can pay by credit/debit card (Visa / Mastercard), Apple Pay / Google Pay, or cryptocurrency — see [Payment methods](/docs/reference/payment-methods).




### Verify the Gemini endpoint (run this once QCode restores Gemini)

> **Not runnable right now**: until QCode offers the Gemini model family again, the verification below will not return usable Gemini models or normal answers. The flow is kept for troubleshooting after the service is back.

Once QCode restores Gemini, verify the endpoint and the key with `curl` first, bypassing `agy` (on the mainland China node, replace the domain with `asia.qcode.cc`):

**macOS / Linux**

```bash
# 1. List the Gemini models that are actually available right now
curl -s https://api.qcode.cc/gemini/v1beta/models \
  -H "x-goog-api-key: $GEMINI_API_KEY"

# 2. Replace <model-id> with a real id from the previous response and send a minimal test request
curl -s "https://api.qcode.cc/gemini/v1beta/models/<model-id>:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "content-type: application/json" \
  -d '{"contents":[{"parts":[{"text":"ping"}]}],"generationConfig":{"maxOutputTokens":16}}'
```


**Windows (PowerShell)**

```powershell
# 1. List the Gemini models that are actually available right now (use curl.exe so PowerShell does not resolve its built-in alias)
curl.exe -s "https://api.qcode.cc/gemini/v1beta/models" `
  -H "x-goog-api-key: $env:GEMINI_API_KEY"

# 2. Replace <model-id> with a real id from the previous response and send a minimal test request
curl.exe -s "https://api.qcode.cc/gemini/v1beta/models/<model-id>:generateContent" `
  -H "x-goog-api-key: $env:GEMINI_API_KEY" `
  -H "content-type: application/json" `
  -d '{"contents":[{"parts":[{"text":"ping"}]}],"generationConfig":{"maxOutputTokens":16}}'
```


**Always take the available models from the live response of the first command**; do not copy a fixed model list from any document. For the full list of models on sale and their prices see [qcode.cc/models](https://qcode.cc/en/models). Once `curl` works, go back to the terminal, run `agy` and start a test conversation.

> **Important untested risk (`/model` panel mapping)**: the `/model` panel inside `agy` and the `agy --model=...` flag use **product display names** (such as `Gemini 3.5 Flash`). The official docs do not say how API model IDs map to panel entries on a custom endpoint, nor whether the panel list comes straight from `GOOGLE_GEMINI_BASE_URL`. This **has not been tested yet**, and the test results will decide once Gemini is restored.


Done right you will see (once Gemini is back): the first `curl` returns JSON containing usable model IDs, the second `curl` returns JSON containing a `candidates` field, and entering the same key on [probe.qcode.cc](https://probe.qcode.cc/) later shows the request with status `200`. A `401` means the path is right but the key is missing or mistyped.


**Stuck? Why curl returns no usable models right now**

QCode has taken the whole Gemini family offline for now, so `/gemini` not serving Gemini models is the expected state until the service is back. If you only want to check whether the `cr_` key in your hand is valid, or want to start AI coding right away, jump to the alternatives in the next step.




### Alternative available today: get on Claude or GPT right away

Until QCode restores Gemini — or whenever you want to call Claude, GPT or Chinese models directly — you do not have to stay with `agy`. The same QCode `cr_` key plugs straight into these clients that speak the Anthropic or OpenAI-compatible protocol:

| Model family | Recommended default model ID | Protocol and Base URL | Asian node (first choice in mainland China) | Recommended clients |
|---|---|---|---|---|
| Claude | `claude-opus-5-5` | Anthropic: `https://api.qcode.cc/api` | `https://asia.qcode.cc/api` | [Claude Code](/docs/getting-started/installation), [Cline](/docs/ide/cline), [Zed](/docs/ide/zed) |
| GPT | `gpt-6.2-sol` | OpenAI-compatible: `https://api.qcode.cc/openai/v1` | `https://asia.qcode.cc/openai/v1` | [Codex CLI](/docs/ide/codex), [Cline](/docs/ide/cline), [Zed](/docs/ide/zed) |
| Chinese models | See [Chinese model integration](/docs/usage/cn-models) | OpenAI-compatible: `https://api.qcode.cc/openai/v1` | `https://asia.qcode.cc/openai/v1` | [Codex CLI](/docs/ide/codex), [Cline](/docs/ide/cline), [Zed](/docs/ide/zed) |

You can confirm right away that the `cr_` key in your hand works on the Claude or GPT endpoint with the two minimal `curl` commands below (swap `api.qcode.cc` for `asia.qcode.cc` if needed):

**Test Claude (claude-opus-5-5)**

```bash
curl -s https://api.qcode.cc/api/v1/messages \
  -H "x-api-key: cr_your_QCode_key" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-opus-5-5","max_tokens":16,"messages":[{"role":"user","content":"ping"}]}'
```


**Test GPT (gpt-6.2-sol)**

```bash
curl -s https://api.qcode.cc/openai/v1/chat/completions \
  -H "Authorization: Bearer cr_your_QCode_key" \
  -H "content-type: application/json" \
  -d '{"model":"gpt-6.2-sol","max_tokens":16,"messages":[{"role":"user","content":"ping"}]}'
```



Done right you will see: JSON containing the model's reply text, with no `401` and no `model_not_available_on_endpoint`; entering that key on [probe.qcode.cc](https://probe.qcode.cc/) shows the request with status `200`.


**Stuck? Can I put claude-opus-5-5 or gpt-6.2-sol into agy?**

No. The custom endpoint of `agy` only speaks the Gemini protocol (`"modelProvider": "gemini"`): it sends neither Anthropic-format requests nor OpenAI-compatible requests, and forcing a Claude or GPT model name onto the Gemini endpoint is simply rejected or answered with `model_not_available_on_endpoint`. Use the matching client from the table above instead.





### Limits are clear — pick your next step

You now have the full configuration reference for connecting Google Antigravity CLI (`agy`) to QCode, along with its current limits: once QCode restores Gemini you can turn the configuration above on as is; if you want to write code right now, switch to Claude Code, Codex CLI, Cline or Zed with the same `cr_` key and use `claude-opus-5-5` and `gpt-6.2-sol`. From here you can:

- [Claude Code install and setup](/docs/getting-started/installation)
- [Codex CLI integration](/docs/ide/codex)
- [Endpoints and API formats](/docs/getting-started/endpoints-and-api-paths)
- [Gemini CLI integration](/docs/ide/gemini)
- Check the current plans on the [pricing page](https://qcode.cc/en/pricing?utm_source=docs.qcode.cc&utm_medium=tut_done&utm_campaign=knowledge_base&src=docs-ide-antigravity-done)
- Go back to the [Dashboard](https://qcode.cc/en/dashboard) to manage keys and usage


## Common errors

| Error message | Why | What to do |
|---|---|---|
| `agy` fails to start / the CLI will not come up | `"modelProvider": "gemini"` is set in `settings.json`, but the current terminal has no `GEMINI_API_KEY` | Set the `GEMINI_API_KEY` environment variable in that terminal; if you do not want API-key mode for now, delete that field from `settings.json` and Google sign-in works again |
| `401 Unauthorized` | The key was not injected into this terminal, is mistyped, or contains leading / trailing spaces or wrong quotes | Check `GEMINI_API_KEY` (or the key variable of the alternative endpoint), make sure it starts with `cr_` and has no stray spaces |
| `404 Not Found` | `GOOGLE_GEMINI_BASE_URL` ends with an extra `/v1beta`, or the path prefix is mistyped | Set it to `https://api.qcode.cc/gemini` (`https://asia.qcode.cc/gemini` in mainland China), with no `/v1beta` and no trailing slash |
| `model_not_available_on_endpoint` or model unavailable | A Claude / GPT model was sent to the Gemini endpoint, or QCode currently has the Gemini family offline | `agy` only speaks the Gemini protocol; for now use a client that supports `claude-opus-5-5` (`https://api.qcode.cc/api`) or `gpt-6.2-sol` (`https://api.qcode.cc/openai/v1`) |
| `'irm' 不是内部或外部命令` | A PowerShell install command was pasted straight into Windows CMD | Run `install.ps1` in Windows PowerShell, or use the `install.cmd` command in CMD |
| The macOS / Linux install script exits with an error | The Windows-only `--skip-aliases` or `--skip-path` was copied after `install.sh` | Drop those two flags; `install.sh` on macOS / Linux accepts only `-d, --dir <path>` and `-h, --help` |
| `.env` or `GOOGLE_API_KEY` has no effect | You carried over your Gemini CLI habit, but `agy` does not load `.env` and does not read `GOOGLE_API_KEY` | Set `GEMINI_API_KEY` in the system or terminal environment instead |
| Slow or timed-out connections from mainland China | The `api.qcode.cc` main domain is being used | Switch the domain to the Asian node `asia.qcode.cc` (for example `https://asia.qcode.cc/gemini`, `https://asia.qcode.cc/api`, `https://asia.qcode.cc/openai/v1`); the key stays the same |
| `/logout` does nothing | You are signed in with `GEMINI_API_KEY` | Expected: in API-key mode there is no local sign-in session to clear |

## FAQ

### What happens when my key expires?

Two cases:

- A **personal plan** key **cannot be renewed** when it expires: reopen a plan and switch to a new `cr_` key.
- For a **pay-as-you-go pack**, buy a new pack after the key expires and **the same key starts working again**, with no need to change the key string.

If you do switch to a new key, update `GEMINI_API_KEY` (or the Anthropic / OpenAI key variable you configured in another client) as well, then restart the terminal or the client.

### Can the Antigravity desktop IDE (2.0) reach QCode by editing `settings.json`?

No. `~/.gemini/antigravity-cli/settings.json` only affects the command-line tool `agy`. The Antigravity 2.0 desktop IDE has no official BYOK or custom-provider entry point and cannot move its built-in Agent model to a third-party endpoint. The local-proxy interception used in the community is an unofficial reverse-engineering workaround that can break with any version update, so this page does not recommend it in production.

### I want to code with QCode right now — which tool and model should I pick?

The same QCode `cr_` key works directly in several mature clients:

- For **Claude** (recommended default model `claude-opus-5-5`, Anthropic endpoint `https://api.qcode.cc/api`): prefer [Claude Code](/docs/getting-started/installation), [Cline](/docs/ide/cline) or [Zed](/docs/ide/zed).
- For **GPT** (recommended default model `gpt-6.2-sol`, OpenAI-compatible endpoint `https://api.qcode.cc/openai/v1`) or Chinese models: prefer [Codex CLI](/docs/ide/codex), [Cline](/docs/ide/cline) or [Zed](/docs/ide/zed).

For the live list of models on sale and the billing rates, see [qcode.cc/models](https://qcode.cc/en/models).

### Migrating from Gemini CLI — does Google's "enterprise paid keys are unaffected" apply to QCode?

It does not. "Enterprise paid keys are not affected by the 2026-06-18 shutdown" in Google's 2026-05-19 announcement means a paid Gemini / Gemini Enterprise Agent Platform API key bought directly from Google, not a QCode `cr_` key. If your team already holds an official Google enterprise key, see [Gemini CLI integration](/docs/ide/gemini); if you want to keep QCode's unified billing and routing, the current advice is to move to a client that supports Claude / GPT.

### How do the `/model` panel entries in `agy` map to model IDs on a custom endpoint?

This is a blind spot the official docs have not covered yet: the `/model` panel in `agy` and the `agy --model=...` flag use product display names (such as `Gemini 3.5 Flash`), and Google has published neither the mapping rules between API IDs and display names on a custom endpoint nor whether the panel list is pulled dynamically from `GOOGLE_GEMINI_BASE_URL`. That chain cannot be tested before QCode restores Gemini; afterwards, go by what `/v1beta/models` actually returns.

### What is the difference between image input (vision) and image generation?

CLI tools such as `agy` support **image input (vision)** — you reference a screenshot, design mock-up or architecture diagram path in the prompt and a model with vision understanding analyses it to write code or debug. **Image generation**, by contrast, calls the dedicated image model `gpt-image-2` over QCode's separate image endpoint; it is not part of the Gemini text/vision interface. See [gpt-image-2 image generation](/docs/usage/image-2) for usage.

## Further reading

- [Endpoints and API formats](/docs/getting-started/endpoints-and-api-paths) — the source of truth for protocols and model families
- [Claude Code install and setup](/docs/getting-started/installation) — the main CLI option with `claude-opus-5-5`
- [Codex CLI integration](/docs/ide/codex) — the terminal option with `gpt-6.2-sol`
- [Gemini CLI integration](/docs/ide/gemini) — the older tool, for reference before migrating
- [Subagents](/docs/advanced/subagents) — orchestrate several background agents
- [Automation and CI/CD](/docs/advanced/headless) — headless mode and scripted usage
- [Antigravity official docs](https://antigravity.google)