One key, three protocols: Claude Code, Codex CLI, Antigravity CLI, OpenCode

I run qcode.cc, an independent API service (not official Anthropic, OpenAI or Google). This is a copy-paste cheat sheet for pointing four coding tools at it. The protocol is chosen by the URL path, not by the key.

Which URL goes where

ToolSettingBase URL
Claude CodeANTHROPIC_BASE_URLhttps://api.qcode.cc/api
Codex CLIbase_url + wire_api = "responses"https://api.qcode.cc/openai
OpenAI SDK / chat clientsbase_urlhttps://api.qcode.cc/openai/v1
Antigravity CLI (agy), Gemini CLI, @google/genaiGOOGLE_GEMINI_BASE_URLhttps://api.qcode.cc/gemini
OpenCode (google provider)baseURLhttps://api.qcode.cc/gemini/v1beta

No trailing slash. Same paths on https://asia.qcode.cc and https://us.qcode.cc. Never add /v1beta twice: the Gemini SDK-style clients append it themselves, OpenCode's google provider does not.

Claude Code

Claude Code appends /v1/messages itself, so do not add /v1.

export ANTHROPIC_BASE_URL="https://api.qcode.cc/api"
export ANTHROPIC_AUTH_TOKEN="cr_your_key"
# optional: export ANTHROPIC_MODEL="claude-opus-5-5"

Codex CLI

Codex needs the Responses protocol. Put this in ~/.codex/config.toml and the key in ~/.codex/auth.json as OPENAI_API_KEY, or use env_key instead (choose one, not both).

# ~/.codex/config.toml
model_provider = "qcode"
model = "gpt-6.2-sol"

[model_providers.qcode]
name = "qcode"
base_url = "https://api.qcode.cc/openai"
wire_api = "responses"
requires_openai_auth = true

# ~/.codex/auth.json
{ "OPENAI_API_KEY": "cr_your_key" }

Antigravity CLI (agy)

agy only accepts the Gemini native protocol. Settings go in ~/.gemini/antigravity-cli/settings.json; write the display name exactly, because the raw id "gemini-4-neon" makes agy fall back to another model and return 404. The desktop Antigravity IDE does not support custom endpoints.

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

# ~/.gemini/antigravity-cli/settings.json
{
  "modelProvider": "gemini",
  "model": "Gemini 4 Neon (High)"
}

OpenCode (google provider)

OpenCode's google provider does not append /v1beta, so the Base URL must end with /gemini/v1beta. Provide the key through OpenCode's credential flow (/connect).

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "google": {
      "options": { "baseURL": "https://api.qcode.cc/gemini/v1beta" }
    }
  }
}

Quick check

With a key: 400 means the path and key are accepted (no body sent), 401 means a bad key, 404 means a wrong prefix.

KEY="cr_your_key"
curl -s https://api.qcode.cc/gemini/v1beta/models -H "x-goog-api-key: $KEY"
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.qcode.cc/api/v1/messages -H "x-api-key: $KEY"
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://api.qcode.cc/openai/v1/responses -H "Authorization: Bearer $KEY"

Team plan (multi-seat)

Seats are sold per unit: $4,000 of quota per month and 35 concurrent requests per seat, from ¥1,800 (about $257) per seat per month. Published steps: ¥1,760 at 3+ seats, ¥1,720 at 7+, ¥1,680 at 11+, plus a one-time ¥200 setup fee. You get a separate domain, sub-keys with their own limits and one bill. Details: enterprise guide, qcode.cc/enterprise.

Partner / white-label program

For people who want to resell access under their own brand: wholesale quota that never expires, tiers 0.95x to 0.75x, a storefront, redeem codes and an API. Overview and FAQ: partner FAQ, reseller.qcode.cc.

More guides: Troubleshooting · Env vars · Cursor / Cline · Evaluate a relay · Gemini · Antigravity CLI · OpenCode · Codex · docs.qcode.cc

I run qcode.cc. Facts checked against docs.qcode.cc on 2026-12-05. Pricing: qcode.cc/pricing (no free quota; personal plans from ¥63 / $9 for 30 days, packs from ¥26 / $4 for 7 days). Contact: hi@qcode.cc.