Warning
π¨ Disclaimer: This project is an unofficial proxy tool intended strictly for educational and personal use. It is not affiliated with Google or Anthropic. Using this tool may violate their Terms of Service and could result in your account being banned. Use at your own risk.
Unlock free, unlimited usage of Claude Code CLI using Google's Gemini 3 models.
This proxy bridges the Claude Code CLI to Google's Cloud Code API. It allows you to use the latest, most advanced Claude model names (including 4.6 and 3.7) while routing them to Gemini 3 Pro (High Reasoning) and Gemini 3 Flash for free execution.
Supports the absolute latest "Thinking" model definitions by mapping them to Gemini 3 Pro High Reasoning:
- Claude 4.6 Opus (
claude-opus-4-6) - Claude 3.7 Sonnet (
claude-thinking-3-7) - Gemini 3 Pro (
gemini-3-pro)
- Auto-Switching: If
Gemini 3 Prohits a rate limit (429), the proxy automatically retries the request using Gemini 3 Flash. - No Interruptions: You never get stuck with "Overloaded" errors; the work continues seamlessly.
- Thought Signatures: Includes proprietary handling for Gemini's
thought_signature, ensuring complex tool-use chains working perfectly where other proxies fail. - Streaming: Full real-time streaming support.
git clone https://github.com/SovranAMR/claude-code-gemini-api.git
cd claude-code-gemini-apiYou need to be logged in to Google Cloud. If you have gcloud installed:
gcloud auth application-default loginAlternatively, place your valid application_default_credentials.json at ~/.claude-code-google-credentials.json.
If you haven't already:
npm install -g @anthropic-ai/claude-codeSimply run the start script. It handles everything:
bash start.sh- Starts Proxy: Launches the local bridge on port
51200. - Configures CLI: Points Claude Code to
http://localhost:51200. - Launches Interface: Starts Claude Code with Gemini 3 Pro (emulating Claude 4.6 capabilities) selected.
You can request different models in Claude Code, and they will be mapped automatically:
| Claude Model Name Requested | Mapped To (Google) | Description |
|---|---|---|
claude-opus-4-6-thinking |
Gemini 3 Pro | High Reasoning / Thinking Mode |
claude-sonnet-3-7 |
Gemini 3 Pro | Fast / Balanced |
claude-3-5-haiku |
Gemini 3 Flash | Ultra-Fast / Fallback |
Contributions are welcome! Please submit a Pull Request.
MIT License. See LICENSE for details.