Use Claude Code — the most powerful AI coding agent — with any LLM API key.
Gemini · OpenAI · Mistral · Groq · DeepSeek · and more
Claude Code is the best AI coding agent available. But you don't need an Anthropic subscription to use it.
With cc-gateway, you can point Claude Code at any LLM provider — Gemini, GPT-4o, Groq, DeepSeek, Mistral — using your own API keys. Zero changes to your workflow. Just type claude-g instead of claude.
claude-g "refactor this module" # runs Claude Code, powered by Gemini
claude-w "write unit tests" # same agent, powered by GPT-4o
claude # your normal Anthropic Claude
Everything works — file editing, bash execution, multi-step agents, all Claude Code tools.
claude-g [args...]
│
▼
litellm proxy (auto-started locally, ~3s on first run)
│
▼
Gemini / OpenAI / Groq / DeepSeek / ...
cc-gateway generates thin shell wrappers that inject ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY, then exec the real claude binary. A local litellm proxy handles protocol translation so Claude Code's API calls reach any provider transparently.
git clone https://github.com/Terry-Yuxiang/cc-gateway
cd cc-gateway
sh install.sh
install.shalso installslitellmautomatically if not found.
Then add a provider:
cc-gateway add gProvider type [anthropic-compat]: gemini
model (e.g. gemini/gemini-2.0-flash): gemini/gemini-flash-latest
api_key: <your-gemini-api-key>
cc-gateway apply # generate the wrapper script
claude-g # use Claude Code powered by GeminiThat's it. litellm starts automatically in the background on first use.
| Command | Provider | Free tier |
|---|---|---|
claude-g |
Google Gemini | ✅ Yes |
claude-w |
OpenAI | ❌ |
claude-d |
DeepSeek | ✅ Yes (very cheap) |
claude-r |
Groq | ✅ Yes |
claude-m |
Mistral | ✅ Yes |
claude-b |
AWS Bedrock | — |
claude-v |
Google Vertex AI | — |
claude-z |
Azure OpenAI | — |
claude-c |
Cohere | ✅ Yes |
claude-t |
Together AI | ✅ Yes |
Any name works — you choose the suffix when running cc-gateway add <name>.
cc-gateway add <name> Add a provider
cc-gateway apply Generate wrapper scripts from config
cc-gateway list List configured providers
cc-gateway remove <name> Remove a provider and its wrapper
cc-gateway edit Open config in $EDITOR
cc-gateway stop [name] Stop litellm proxy
cc-gateway status Show proxy status
~/.cc-gateway/config.yaml — edit directly or via cc-gateway edit.
providers:
g:
type: gemini
model: gemini/gemini-flash-latest
api_key: <your-key>
w:
type: openai
model: openai/gpt-4o
api_key: <your-key>
d:
type: deepseek
model: deepseek/deepseek-chat
api_key: <your-key>
# Anthropic-compatible endpoints work too (no proxy needed)
custom:
base_url: https://your-proxy.com
api_key: <your-key>- Claude Code installed and in PATH
- Python 3.10+ (for litellm — auto-installed by
install.sh) - Or:
uv(brew install uv) — then litellm runs via uvx with zero install
If cc-gateway saves you money or unlocks Claude Code for you, consider giving it a ⭐