The first open-source, OpenAI-compatible proxy engine that unlocks Google's next-generation Gemini 4 Argon frontier model with customizable Thinking Levels (High, Medium, Low) β 100% Free & Unlimited.
Gemini 4 Argon is Google's newest, highly-advanced frontier intelligence model engineered specifically for complex tasks, deep logic deduction, and emergent reasoning.
Until now, Argon's thinking controls were locked behind Google's internal web interface. This repository reverse-engineers Google's proprietary JSPB extension protocol to expose full programmatic control over Gemini 4 Argon via standard OpenAI-compatible REST and streaming endpoints:
- π§ Argon High (
argon-high/ Level 2): Deep multi-pass thinking trace for hard logic riddles, competitive programming, and complex architecture. - βοΈ Argon Medium (
argon-medium/ Level 4): Balanced thinking depth for structured debugging and comprehensive analysis. - β‘ Argon Low (
argon-low/ Level 1): Rapid reasoning with quick self-verification. - π Gemini 3.8 Flash (Default Flagship): Powered by
gemini-3.8-flashas the ultra-fast default engine (is_default: true) for everyday zero-latency tasks.
| Feature | Description |
|---|---|
| π§ Gemini 4 Argon Native | Programmatic access to Google's frontier Argon model with multi-level reasoning control (argon-high, argon-medium, argon-low). |
| β‘ Gemini 3.8 Flash Default | gemini-3.8-flash is set as the default model (is_default: true) for instant sub-second completions without configuration. |
| π Drop-In OpenAI Standard | Seamlessly connects with Cursor, Cline, NextChat, OpenWebUI, LangChain, and the standard OpenAI Python / JS SDKs. |
| π‘οΈ Distributed Account Pooling | Connect 1 to 100+ Google accounts to load-balance requests with least-busy routing and automatic rate-limit cooldown management. |
| πͺ Zero-Touch Cookie Bridge | Companion Chrome extension automatically discovers the local server and syncs session credentials with zero tab manipulation. |
| π Pure Go HTTP/3 QUIC | State-of-the-art TLS 1.3 fingerprint simulation (Chrome 152 JA4) with 0-RTT session resumption for ultra-low latency. |
| π Dual Intelligence Analytics | Real-time SQLite WAL storage tracking token usage, latency, and estimated cost-savings exported directly to JSON and Excel (.xlsx). |
| Model ID | Aliases | Thinking Depth | Tier | Role & Description |
|---|---|---|---|---|
gemini-4-argon |
argon, 4-argon, gemini-4 |
Low (1) | Free / Auth | π Frontier Intelligence for complex problem solving |
gemini-4-argon-thinking-high |
argon-high, thinking-high |
High (2) | Free / Auth | π§ Deep Reasoning with maximum thinking steps |
gemini-4-argon-thinking-medium |
argon-medium, thinking-medium |
Medium (4) | Free / Auth | βοΈ Balanced Reasoning for code reviews and analysis |
gemini-4-argon-thinking-low |
argon-low, thinking-low |
Low (1) | Free / Auth | β‘ Fast Thinking with lightweight verification |
gemini-3.8-flash |
flash, 3.8-flash, default |
None | Free | π Default Model β Ultra-fast, balanced multimodal flagship |
gemini-3.8-flash-thinking-high |
flash-high |
High (2) | Free | β‘ Flash with deep thinking enabled |
gemini-3.1-pro |
pro, 3.1-pro |
None | Subscription | π» Advanced multi-turn coding (Gemini Advanced accounts) |
gemini-3.1-pro-thinking-high |
pro-high |
High (2) | Subscription | π§ Pro with deep multi-pass reasoning |
git clone https://github.com/kodelyx/free-gemini-api.git
cd free-gemini-api/free-gemini-api
go run main.gocd free-gemini-api/free-gemini-api
docker compose up -d --buildThe server listens on http://127.0.0.1:8001 (API) and ws://127.0.0.1:9226 (Cookie Bridge).
- Open
chrome://extensions/in Chrome. - Toggle Developer mode on (top-right).
- Click Load unpacked and select the
gemini-extension/folder. - Log into gemini.google.com.
- The extension automatically detects your session and streams the worker credentials to the local API pool.
curl -X POST http://localhost:8001/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer any-key" \
-d '{
"model": "argon-high",
"messages": [
{
"role": "user",
"content": "A farmer has 17 sheep. All but 9 die. How many sheep are left alive? Show your step-by-step thinking."
}
]
}'from openai import OpenAI
# Point client to your local Free Gemini 4 Argon server
client = OpenAI(
base_url="http://localhost:8001/v1",
api_key="not-needed"
)
# 1. Ask Gemini 4 Argon with High Thinking
response = client.chat.completions.create(
model="argon-high",
messages=[
{"role": "system", "content": "You are a world-class algorithm designer."},
{"role": "user", "content": "Write a thread-safe LRU cache in Go with O(1) eviction."}
]
)
print("π§ Gemini 4 Argon:", response.choices[0].message.content)
# 2. Use Default Fast Model (Gemini 3.8 Flash)
flash_resp = client.chat.completions.create(
model="gemini-3.8-flash",
messages=[{"role": "user", "content": "Explain quantum superposition in 1 sentence."}]
)
print("β‘ Gemini 3.8 Flash:", flash_resp.choices[0].message.content)import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "http://localhost:8001/v1",
apiKey: "free-gemini",
});
async function main() {
const stream = await openai.chat.completions.create({
model: "argon-high",
messages: [{ role: "user", content: "Solve: If 5 machines make 5 widgets in 5 minutes, how long do 100 machines take to make 100 widgets?" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
}
main();| Client / Tool | Base URL | Model Name | API Key |
|---|---|---|---|
| Cursor / Cline | http://localhost:8001/v1 |
argon-high or gemini-3.8-flash |
Any string |
| NextChat / ChatGPT-Next-Web | http://localhost:8001/v1 |
argon-high, flash-high |
Any string |
| OpenWebUI / LibreChat | http://localhost:8001/v1 |
gemini-4-argon, default |
Any string |
| LangChain / LlamaIndex | http://localhost:8001/v1 |
argon-high |
Any string |
[ Clients / Cursor / OpenAI SDK / Agents ]
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β Free Gemini API Server β
β (Port 8001: HTTP/3 | Port 9226: WS) β
ββββββββββββββββββββββ¬βββββββββββββββββββββ
β
ββββββββββββββ΄βββββββββββββ
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β Model Registry β β Output Arranger β
β - gemini-4-argon β β (Native Tool Calls β
β - argon-high β β & Sanitization) β
β - gemini-3.8-flash β βββββββββββββββββββββββ
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β Multi-Account Pool β
β (Least-Busy Worker) β
ββββββββββββ¬βββββββββββ
β
ββββββββββββββββ΄βββββββββββββββ
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β Google Cloud β β Chrome Ext β
β Backend API β β (WebSocket) β
ββββββββββββββββ ββββββββββββββββ
| Method | Endpoint | Description |
|---|---|---|
POST |
/v1/chat/completions |
OpenAI-compatible chat & streaming completions (Default: gemini-3.8-flash, Frontier: argon-high) |
GET |
/v1/models |
List all available models, aliases, and thinking levels |
POST |
/v1/models |
Dynamically register custom model hashes at runtime |
POST |
/v1/models/discover |
Autonomously probe Google backend for new unannounced models |
GET |
/v1/workers |
Real-time worker pool health, active accounts & concurrency metrics |
GET |
/stats |
SQLite token accounting, messages count & financial ROI savings |
GET |
/export/excel |
Download comprehensive multi-sheet Excel report (.xlsx) |
GET |
/v1/analytics |
Machine-readable JSON analytics report |
GET |
/health |
Live cookie TTL inspector and cluster health |
GET |
/help |
Terminal developer CLI guide |
./goapi --help # Show terminal CLI guide
./goapi --stats # Print real-time database usage & cost saved
./goapi --export out.xlsx # Export detailed spreadsheet analytics
./goapi --mcp # Run as Model Context Protocol (MCP) server- Zero Hardcoded Secrets: Credentials and cookies are held strictly in local files and memory; nothing is sent to external third-party servers.
- Local Network Isolation: All WebSocket discovery and cookie sync happen strictly over localhost or local subnet.
- Safe Version Control: Pre-configured
.gitignoreprevents private Google session tokens and cookies from ever being committed.
If you find Gemini 4 Argon Free API helpful, please give this repository a β Star to support ongoing development and help other developers discover Google's frontier reasoning models!
MIT License. Developed for the developer and AI research community.