Features • Quick Start • Getting Started • API Reference • Architecture
Free Provider is a self-hosted, OpenAI-compatible API server and chat web UI that is powered by the ChatGPT web client — no API keys, no paid plan, zero-cost inference.
It exposes familiar endpoints like POST /v1/chat/completions and GET /v1/models, so any OpenAI SDK or tool can point at it locally and not pay a cent.
- OpenAI-compatible — drop-in replacement endpoints (
/v1/models,/v1/chat/completions) - Auto model balancing —
model: "auto"alternates each request between ChatGPT and Gemini, round-robin through paired per-provider windows (one window from each backend work together as a pair) - Streaming (SSE) — real-time, token-by-token responses
- Stateless — every request is independent, so multi-turn context is preserved via the message array
- API-key auth — bearer-token validation out of the box
- Rate limiting + cooldown — exponential backoff, inter-request delay, and a global cooldown after repeated Cloudflare blocks (returns
429+Retry-After) - Proxy rotation — rotate through
http/https/socks4/socks5proxies on blocks, with per-proxy benching - Streaming retry — SSE streams retry like ordinary requests instead of dying on first failure
- Polished web UI — dark, responsive chat interface with markdown + code highlighting
- Built-in logging — every user message and AI response is logged to the terminal and
chat.log - Anonymous or cookie mode — works with no account, or unlock more with your ChatGPT cookies
- Zero-cost — runs entirely against the public ChatGPT web backend
git clone <your-repo-url>
cd <repo> && npm install # client deps (undici for proxies)
cd <repo>/server && npm install # server deps (express)npm start # or: pnpm startOpen the UI at http://localhost:3000.
The terminal prints the server's API key and the exact export line to reuse it:
API Key: sk-free-… (generated, saved in .api-key)
-> export OPENAI_API_KEY="sk-free-…"
curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer sk-free-…" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}],"stream":true}'Or point any OpenAI SDK at http://localhost:3000/v1.
The bundled client library (in client/ & src/) reverse-engineers ChatGPT's web endpoints — the same requests the browser makes. The server wraps that client in a clean, OpenAI-compatible surface so you get a free, local AI provider without needing an OpenAI API key.
⚠️ This is an unofficial project. It relies on ChatGPT's web backend, which can change at any time. Use responsibly and at your own risk.
| Doc | Description |
|---|---|
| Getting Started | Install, configure, and run everything |
| API Reference | Every HTTP endpoint with examples |
| Architecture | How the server + client fit together |
| Frontend | The web chat UI and its settings |
| Security | API keys, cookies, and logging |
| Client API | The underlying client library methods |
| Client Guide | Using the client directly |
| Testing | Running the 400+ test suite and 85% coverage gate |
MIT © 2025 — see LICENSE.