selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
CatGPT-Gateway logo

Self-host CatGPT-Gateway

OpenAI-compatible API gateway for ChatGPT and Claude

BetaOpen SourceMIT
Updated4 months ago
LanguagePython
Setup difficultyAdvanced
Stars
314
Ports
8000 (FastAPI OpenAI-compatible API), 6080 (noVNC web UI for browser login/debugging)
Install with Docker Compose

What is CatGPT-Gateway?

A self-hosted gateway that automates a real Chromium browser to turn your ChatGPT or Claude web login into an OpenAI-compatible API. It delivers chat completions with streaming, tool calling, vision, file uploads, and DALL-E 3 image generation (ChatGPT only). The FastAPI service works with OpenAI SDKs, LangChain, and any OpenAI-protocol client. Run it via Docker Compose (with virtual display and noVNC), local Python, or Nix. Auth is a Bearer token; browser profiles survive restarts. MIT licensed, active development.

Should you self-host CatGPT-Gateway?

CatGPT-Gateway scores 47/100 on selfhost.directory (how scoring works) and ranks #64 of 125 in AI. It has 314 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is ComfyUI (93/100, 143 701 stars). It scores higher overall, so compare the two before you pick. See CatGPT-Gateway vs ComfyUI side by side.

Features

  • Chat completions
  • File attachments
  • Image generation (DALL-E)ChatGPT provider only; returns 501 for Claude
  • Interactive TUI
  • LangChain compatibility
  • Live browser monitor
  • Multi-tab concurrency
  • OpenAI Compatible API
  • Persistent Sessions
  • SSE streaming
  • Tool/Function calling
  • Vision (image input)

CatGPT-Gateway README

How to install CatGPT-Gateway

Install CatGPT-Gateway with Docker Compose

Docker + Docker Compose
Environment variables
PROVIDER, API_TOKEN, API_PORT, HEADLESS, BROWSER_DATA_DIR, VNC_PASSWORD, and more (see .env.example)

Clone the repo

git clone https://github.com/GautamVhavle/CatGPT-Gateway.git cd CatGPT-Gateway

Copy the example env and pick your provider

cp .env.example .env

Edit .env -> set PROVIDER=claude or PROVIDER=chatgpt

Build and start

docker compose up --build -d

Open the browser UI to log in (one-time)

open http://localhost:6080/vnc.html

Sign into Claude or ChatGPT using EMAIL + PASSWORD or Microsoft/Apple/magic link

⚠ Google login is blocked by Google in automated browser contexts — don't use it

Close the noVNC tab when done - your session is saved to a Docker volume

Verify it works

curl -H "Authorization: Bearer dummy123" http://localhost:8000/v1/models

Recommended method; includes Xvfb + noVNC for headless browser login

More in API Gateway

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…