explaingit

pawanosman/chatgpt

5,893TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A local reverse proxy server that mirrors the OpenAI chat completions API so existing OpenAI-compatible code can be redirected to it without a paid API key by changing only the base URL.

Mindmap

mindmap
  root((ChatGPT Proxy))
    What it does
      OpenAI API mirror
      No paid key required
      Local proxy server
    Deployment
      Docker single command
      Windows and Linux
      Android Termux
    Access Options
      Self-hosted
      Hosted endpoint
      Discord key request
    Status
      Currently outdated
      Updates pending
    Tech Stack
      TypeScript
      Docker
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Redirect existing OpenAI API client code to this local proxy by changing only the base URL, keeping all other code unchanged

USE CASE 2

Run the proxy in Docker with a single command and attach third-party chat UIs via Docker Compose

USE CASE 3

Request a free API key from the hosted version through a Discord bot and use it in your code without self-hosting

Tech stack

TypeScriptDocker

Getting it running

Difficulty · easy Time to first run · 30min

Currently marked outdated and not working, the hosted endpoint requires joining Discord and having an account at least 7 days old.

Free to use and modify, but any modified version you distribute or run as a network service must also be released as open source under the same license.

In plain English

This repository is a reverse proxy server that exposes a local API endpoint matching the structure of OpenAI's chat completions API, but routes requests without requiring a paid OpenAI API key. The idea is that existing code written against the OpenAI Python or Node.js libraries can point at this local server instead by changing only the base URL, and the rest of the code stays the same. You can run it yourself on a Windows or Linux PC, inside Docker, on an Android phone using Termux, or connect to a pre-hosted version maintained by the project author. The self-hosted Docker setup takes a single command and starts the proxy on port 3040. A Docker Compose option is also included for running third-party chat interfaces alongside the proxy. To use the hosted version (rather than self-hosting), you join the project's Discord server, request an API key through a bot command in a specific channel, and use that key with the hosted endpoint URL instead of OpenAI's. The README notes that a Discord account must be at least seven days old to join. The README states that the project is currently outdated and not working as of the last update. The author says it will be updated when time permits, and points users toward the hosted API in the meantime. The project is written in TypeScript and licensed under AGPL-3.0.

Copy-paste prompts

Prompt 1
I have Python code using the openai library. Show me how to point it at a local proxy on port 3040 instead of the OpenAI API endpoint.
Prompt 2
Help me set up the pawanosman/chatgpt Docker proxy and connect it to an open-source chat UI using Docker Compose.
Prompt 3
How do I request an API key from the hosted version of this proxy through the Discord bot and configure it in my environment variables?
Open on GitHub → Explain another repo

← pawanosman on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.