Supported tools
CodeGateway exposes three compatible surfaces, so most mainstream Agent CLIs can connect directly:
Claude Code: set two environment variables. See Claude Code one-line setup
Loading…
Quick overview of endpoints, model routing rules, and per-tool setup entries for mainstream Agent CLIs.
CodeGateway exposes three compatible surfaces, so most mainstream Agent CLIs can connect directly:
Claude Code: set two environment variables. See Claude Code one-line setup
OpenAI Codex CLI: set the base URL and key. See Codex CLI integration.
OpenClaw: change one base URL plus one key. See OpenClaw setup.
Qwen Code: register a compatible provider in its settings. See Qwen Code integration.
DeepSeek Harness: add a custom provider in model settings. See DeepSeek Harness integration.
Reasonix: point its config at the gateway. See Reasonix integration.
GitHub Copilot CLI: point it at a custom provider via four environment variables. See Copilot CLI integration.
opencode / Aider / Crush: OpenAI-compatible or Anthropic-compatible tools; see the docs hub.
Gemini CLI: officially supports only the Gemini-native protocol, so it cannot connect to this gateway. See Gemini CLI compatibility note.
Cursor CLI: officially supports only Cursor account auth. See Cursor CLI compatibility note.
Open codegateway.dev and click Sign up — email + password, and you get a $2 trial credit.
Log into the Dashboard, go to API Keys, and create a key.
Keys start with sk-cg-. The full key is shown only once — save it immediately.
You can create multiple keys (one per project or tool).
CodeGateway speaks three compatible protocols; pick the one your tool speaks:
Anthropic Messages (Claude Code, Crush, etc.): base URL https://api.codegateway.dev, path /v1/messages.
OpenAI Chat Completions (Codex CLI, Qwen Code, opencode, Aider, Copilot CLI, etc.): base URL https://api.codegateway.dev/v1, path /v1/chat/completions.
OpenAI Responses (Codex CLI response mode): same base URL, path /v1/responses.
Each tool stores its config differently (env vars vs config files). The two most common setups:
Claude Code:
export ANTHROPIC_BASE_URL="https://api.codegateway.dev"
export ANTHROPIC_AUTH_TOKEN="sk-cg-your-key"Codex CLI:
export OPENAI_BASE_URL="https://api.codegateway.dev/v1"
export OPENAI_API_KEY="sk-cg-your-key"For the rest (Qwen Code, DeepSeek Harness, Reasonix, opencode, Aider, Crush, Copilot CLI), see each tool's page.
Verify the underlying link before touching the tool:
curl https://api.codegateway.dev/v1/models \
-H "Authorization: Bearer sk-cg-your-key"A model list means the link is up. Then send one short prompt inside your tool.
Model support differs per protocol — this is the most common stumbling block:
Anthropic Messages protocol: Claude models (e.g. claude-sonnet-4-6) and Gemini models (e.g. gemini-3.8-flash) work with standard payloads.
OpenAI Chat Completions protocol: DeepSeek (deepseek-v4-pro), Kimi (kimi-k2.7-code), GLM (glm-5.3), Qwen (qwen3.8-27b) and others work. GPT-series models (gpt-5.3-codex, gpt-5.5, etc.) are subject to upstream regional restrictions — requests from some countries/regions return a 400 with a hint to switch models or network region.
Claude- and Gemini-series models are not available on the OpenAI protocol, and vice versa GPT-series models are region-restricted on the Messages protocol too.
The full model list is always available in the Dashboard Models page, or via the models endpoint above.
For coding, we recommend deepseek-v4-pro, kimi-k2.7-code, or glm-5.3 for OpenAI-protocol tools; claude-sonnet-4-6 for Claude Code.
Pay as you go per token, with tiered markup — see Tier pricing explained.
$2 free trial credit covers any model.
Recharge via Stripe (card) and CNY channels — see Billing & recharge guide.
Q: Can one key be used across multiple tools? Yes. Keys are scoped to your account/project, not to a protocol — the same key works for Claude Code and Qwen Code.
Q: 401 Unauthorized after configuration? Check that the whole key was copied (sk-cg- prefix included) and that it hasn't expired; you can regenerate keys in the Dashboard. See Troubleshooting.
Q: GPT models return a 400 about unsupported region? GPT-series models are region-restricted by the upstream provider. Switch to DeepSeek / Kimi / GLM / Qwen models, or use a supported network region.
Q: Can I use Gemini models in Claude Code? Yes. gemini-3.8-flash is available on the Anthropic Messages protocol — set the model to gemini-3.8-flash in your Claude Code config.
Q: Where do I find the latest model IDs? Dashboard → Models, or the models endpoint above. Docs list a review date, but the endpoint is authoritative.
Q: I lost my key. Keys are shown once. Delete and recreate one in the Dashboard; your balance is unaffected.
Q: Can I get an invoice? Yes. Contact support after a recharge — see Billing & recharge guide.