Practical overview
When it fits
Use it when an application expects an OpenAI-compatible API and you want requests routed through a logged-in ChatGPT or Claude browser session.
Who it is for
- Developers integrating ChatGPT or Claude browser sessions with OpenAI-protocol clients.
- Teams using tools such as the OpenAI Python SDK or LangChain that want an OpenAI-compatible interface.
Documented uses
- Send chat-completion requests to a logged-in ChatGPT or Claude session through a local API.
- Use documented streaming, multi-turn conversations and tool calling through compatible clients.
- Pass image input and file attachments through the gateway; generate images through the ChatGPT provider.
Requirements & limits
The repository is public and identifies an MIT license. The setup requires logging in to a ChatGPT or Claude account; the gateway's API uses a configured bearer token.
- The gateway automates provider web interfaces rather than calling official provider APIs.
- Both providers document chat, streaming, tool calling, vision and file attachments; image generation is listed for ChatGPT only.
- The repository documents Docker and local Python installation, with Python 3.9+ for the local setup.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up the gateway locally
Install the local Python setup, choose a provider, complete the browser login and start the API server.
Before you start
- Python 3.9 or newer
- A ChatGPT or Claude account
- A supported login method: email and password, Microsoft, Apple or magic link; Google OAuth is not supported in the automated browser context
Steps
Clone the repository and enter its directory.
Create and activate a Python virtual environment, install requirements, and install Chromium with Patchright.
Copy
.env.exampleto.envand selectchatgptorclaudeas the provider.Run the command below and sign in through the opened browser.
python scripts/first_login.pyStart the server with the command below.
python -m src.api.server
Expected outcome
The API server is available locally at `http://localhost:8000`.
Guide limitations
- The documented Google OAuth login route is blocked in automated browser contexts.
- This setup uses a browser session rather than a provider's official API.
Connect an OpenAI-compatible client
Configure the OpenAI Python SDK to send a chat-completion request to a running local gateway.
Before you start
- A running CatGPT Gateway server
- The OpenAI Python SDK
- The gateway base URL and configured bearer token
Steps
Create an OpenAI client with the gateway URL as
base_urland the gateway token asapi_key.Send a chat-completion request using
catgpt-browserfor ChatGPT orclaude-browserfor Claude.
Expected outcome
The client sends a chat request to the selected browser-backed provider through the gateway's OpenAI-compatible interface.
Guide limitations
- The provider account must already be signed in through the gateway browser.
- The model identifier must match the selected provider.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- GautamVhavle/CatGPT-Gateway · Official homepage title · retained in its source language

