Skip to content

About

πŸš€ Free Unlimited API for Google Gemini 4 Argon & Gemini 3.8 Flash. OpenAI-compatible /v1/chat/completions with Deep Thinking controls (High/Medium/Low), Go HTTP/3 QUIC, and multi-account pooling.

Topics

Resources

Stars

22 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Gemini 4 Argon β€” Unlimited Free API

Frontier Model Thinking Depth Pricing OpenAI Compatible Transport

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.


🌟 Why Gemini 4 Argon?

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-flash as the ultra-fast default engine (is_default: true) for everyday zero-latency tasks.

πŸ”₯ Key Highlights

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).

πŸ“Š Supported Models & Thinking Matrix

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

⚑ Quickstart

1. Launch the Server

Option A: Native Go (Recommended)

git clone https://github.com/kodelyx/free-gemini-api.git
cd free-gemini-api/free-gemini-api
go run main.go

Option B: Docker Compose

cd free-gemini-api/free-gemini-api
docker compose up -d --build

The server listens on http://127.0.0.1:8001 (API) and ws://127.0.0.1:9226 (Cookie Bridge).


2. Connect Your Account (Zero-Touch)

  1. Open chrome://extensions/ in Chrome.
  2. Toggle Developer mode on (top-right).
  3. Click Load unpacked and select the gemini-extension/ folder.
  4. Log into gemini.google.com.
  5. The extension automatically detects your session and streams the worker credentials to the local API pool.

πŸ’» Code Examples

1. Gemini 4 Argon Deep Thinking (cURL)

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."
      }
    ]
  }'

2. Python (Official OpenAI SDK)

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)

3. JavaScript / TypeScript (Node & Bun)

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();

πŸ› οΈ Third-Party Client Integrations

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

πŸ›οΈ System Architecture

                 [ 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)  β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‘ API Reference & Endpoints

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

βš™οΈ CLI Tools

./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

πŸ”’ Security & Privacy

  • 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 .gitignore prevents private Google session tokens and cookies from ever being committed.

🌟 Support & Community

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!


πŸ“„ License

MIT License. Developed for the developer and AI research community.

About

πŸš€ Free Unlimited API for Google Gemini 4 Argon & Gemini 3.8 Flash. OpenAI-compatible /v1/chat/completions with Deep Thinking controls (High/Medium/Low), Go HTTP/3 QUIC, and multi-account pooling.

Topics

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages