explaingit

basketikun/chatgpt2api

Analysis updated 2026-08-02 · repo last pushed 2026-07-29

⭐ Rising5,507PythonAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Turns your ChatGPT Plus subscription into a free image generation API by reverse-engineering the ChatGPT website. Run it locally to generate and edit images through a standard API compatible with existing AI tools.

Mindmap

mindmap
  root((repo))
    What it does
      Image generation API
      Photo editing
      PowerPoint and Photoshop files
    Key features
      Web interface
      Multi-account management
      OpenAI API format
    How it works
      Reverse-engineers ChatGPT web
      Runs on your computer
      Proxies and failover
    Use cases
      Batch marketing visuals
      Automated photo editing
      Plug into existing apps
    Audience and risks
      Personal learning only
      Account ban risk

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

What do people build with it?

USE CASE 1

Batch-generate marketing visuals using your existing ChatGPT Plus subscription.

USE CASE 2

Edit product photos through an automated workflow via a standard API.

USE CASE 3

Plug image generation into an existing app that expects OpenAI's API format.

USE CASE 4

Pool multiple ChatGPT accounts together with automatic failover and health checks.

What is it built with?

Python

How does it compare?

basketikun/chatgpt2apiapple/ml-depth-promiguelgrinberg/flask-socketio
Stars5,5075,5075,509
LanguagePythonPythonPython
Last pushed2026-07-29
MaintenanceActive
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a ChatGPT Plus or Pro account, a working access token, and a local proxy to handle anti-bot protections.

The project is for personal learning and non-commercial use only, and accounts used with it risk being limited or banned by OpenAI.

In plain English

ChatGPT2API lets you turn ChatGPT's official website into your own private image generation and editing service. Instead of paying for OpenAI's API, you use your existing ChatGPT account to generate images, edit uploaded photos, and even create editable PowerPoint or Photoshop files, all through a standard API that works with popular AI tools like Cherry Studio and New API. Under the hood, the project works by reverse-engineering the behind-the-scenes communication between your browser and ChatGPT's website. You run it on your own computer or server, and it exposes the same API format that OpenAI uses, so other software can connect to it without knowing the difference. It comes with a web interface where you can generate and edit images directly in your browser, and it automatically manages multiple ChatGPT accounts, rotating between them, removing ones that stop working, and refreshing those that hit rate limits. You can import accounts from several sources, including local files, remote servers, or direct access tokens. This is useful for someone who already has a ChatGPT Plus or Pro subscription and wants to use its image generation capabilities programmatically, for example, to batch-generate marketing visuals, edit product photos through an automated workflow, or plug image generation into an existing app that expects OpenAI's API format. A small team could pool several ChatGPT accounts together and route requests through a single endpoint, with the tool handling failover and account health automatically. The project offers several storage options for account and configuration data, ranging from simple local files to an external database. It also includes built-in proxy support to help avoid connection issues with Chatflare's anti-bot protections. The README is clear that this is for personal learning and non-commercial use only, and warns that accounts used with it risk being limited or banned by OpenAI.

Copy-paste prompts

Prompt 1
I have chatgpt2api running locally. Write a Python script that uses the OpenAI API format to generate an image of a futuristic city and save it to a file.
Prompt 2
Help me configure Cherry Studio to connect to my local chatgpt2api instance so I can generate images through its interface instead of using OpenAI's paid API.
Prompt 3
Set up multiple ChatGPT accounts in chatgpt2api with automatic rotation and failover, so that if one account hits a rate limit the next one is used automatically.
Prompt 4
Write a script that uploads a product photo to chatgpt2api and applies an edit prompt to remove the background, using the standard OpenAI image editing API format.

Frequently asked questions

What is chatgpt2api?

Turns your ChatGPT Plus subscription into a free image generation API by reverse-engineering the ChatGPT website. Run it locally to generate and edit images through a standard API compatible with existing AI tools.

What language is chatgpt2api written in?

Mainly Python. The stack also includes Python.

Is chatgpt2api actively maintained?

Active — commit in last 30 days (last push 2026-07-29).

What license does chatgpt2api use?

The project is for personal learning and non-commercial use only, and accounts used with it risk being limited or banned by OpenAI.

How hard is chatgpt2api to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is chatgpt2api for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.