Skip to content

Repository files navigation

⬡ FreeGate

A free and open-source universal AI gateway. Aggregates free-tier LLM providers — Groq, Gemini, OpenRouter, Cerebras, SambaNova, Mistral, Cohere, Hugging Face, and Ollama — behind a single OpenAI-compatible local endpoint.


Getting a standalone app (recommended)

Prerequisites

Build the installer (one command)

# Windows — produces dist-electron/FreeGate Setup.exe
npm install
cd freegate-ui && npm install && cd ..
npm run dist:win

# macOS — produces dist-electron/FreeGate.dmg
npm run dist:mac

# Linux — produces dist-electron/FreeGate.AppImage
npm run dist:linux

The installer bundles everything: the Angular UI, the .NET API as a self-contained binary, and Electron. No runtime installs required on the end-user's machine.


Development mode (live reload)

npm install
cd freegate-ui && npm install && cd ..
npm run dev

This starts three processes concurrently:

  • .NET API on http://localhost:8080 (via dotnet run)
  • Angular on http://localhost:4200 (via ng serve)
  • Electron — waits for both, then opens the app

Note: In dev mode the app loads Angular from the dev server. The first time you run npm run dist:win it will compile everything into a real installable .exe.


First use

  1. Open FreeGate and go to API Keys
  2. Add at least one key — Groq and Gemini are both free with no card required
  3. Start making requests from any OpenAI-compatible client:
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8080/v1",
    api_key="freegate"   # any string — FreeGate uses your stored keys
)

# Standard
response = client.chat.completions.create(
    model="llama-3.3-70b",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="llama-3.3-70b",
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="", flush=True)

Supported providers (free tier)

Provider Free models Get key
Groq Llama 3.3 70B, Mixtral, Gemma 2 console.groq.com
Google Gemini Gemini 2.0 Flash, 1.5 Flash aistudio.google.com
OpenRouter 50+ free models openrouter.ai
Cerebras Llama 3.3 70B cloud.cerebras.ai
SambaNova Llama 3.3 70B, DeepSeek R1 cloud.sambanova.ai
Mistral Mistral 7B, Mistral Small console.mistral.ai
Cohere Command R, Command R+ dashboard.cohere.com
Hugging Face Thousands of models huggingface.co
Ollama Any local model No key needed

How it works

[Any OpenAI-compatible client]  ←  curl, Python, Open WebUI, Continue.dev, ...
           ↓  http://localhost:8080/v1/chat/completions
    ┌─────────────────┐
    │  FreeGate API   │  ASP.NET Core 8 — routing, rate-limit tracking, key store
    └────────┬────────┘
             │  picks best available provider, falls back automatically if rate-limited
    ┌────────▼────────────────────┐
    │  Groq / Gemini / OpenRouter │  ... whichever has your key and isn't throttled
    └─────────────────────────────┘

The Electron shell bundles the Angular dashboard and the .NET API together into one desktop app. The API runs as a background process on localhost — no cloud, no telemetry.


License

MIT © FreeGate Contributors

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages