← all repositories
yukkcat/chatgpt2api

Reverse-engineering ChatGPT into an API, ban risks and all

ChatGPT2API exists to reverse-engineer the ChatGPT web interface into a self-hosted OpenAI-compatible API, complete with disposable account pools and a Vue management console.

chatgpt2api
Velocity · 7d
+8.7
★ / day
star history

What it does

ChatGPT2API intercepts and reverse-engineers the ChatGPT web application’s undocumented endpoints, then re-exposes chat, image generation, and editable file creation through standard OpenAI-compatible REST interfaces. A bundled Vue management console lets you pool multiple accounts, rotate proxy exits, and queue concurrent jobs so one burned credential doesn’t stall the pipeline. It is essentially a self-hosted middleware layer that turns consumer web features into infrastructure you control.

The interesting bit

The project treats ChatGPT consumer accounts as a consumable resource: it can maintain a pool of fresh registrations, import credentials in bulk from CPA or sub2api sources, and automatically swap accounts when limits or bans appear. That design turns a single-user web product into a multi-tenant API gateway, complete with WebDAV asset storage and R2 backups.

Key highlights

  • OpenAI-compatible /v1 endpoints for chat completions, image generation and editing, search, and Anthropic-style messages.
  • Account pool management with OAuth, token refresh, concurrency controls, and automatic failover between credentials.
  • Support for GPT-Image-2, multi-image editing, and editable file tasks such as PPT and PSD generation.
  • Vue 3 management console with real-time monitoring, call logs, proxy routing, and mobile-friendly layout.
  • SQLite or PostgreSQL 18 application database with optional Cloudflare R2 backup and retention policies.

Caveats

  • This is explicit reverse engineering of OpenAI’s consumer web interface; the README warns that using it can get accounts banned or restricted.
  • Endpoint stability depends entirely on undocumented upstream changes, so breakage is a constant risk.
  • The authors explicitly advise against using important, frequently used, or high-value accounts with this tool.

Verdict

A pragmatic fit for developers who need web-only ChatGPT capabilities—like GPT-Image-2 or editable file generation—in a self-hosted pipeline and can tolerate disposable-account churn. If you prefer stability, official support, and a clean conscience, stay on the official OpenAI API.

Frequently asked

What is yukkcat/chatgpt2api?
ChatGPT2API exists to reverse-engineer the ChatGPT web interface into a self-hosted OpenAI-compatible API, complete with disposable account pools and a Vue management console.
Is chatgpt2api open source?
Yes — yukkcat/chatgpt2api is open source, released under the AGPL-3.0 license.
What language is chatgpt2api written in?
yukkcat/chatgpt2api is primarily written in Python.
How popular is chatgpt2api?
yukkcat/chatgpt2api has 572 stars on GitHub.
Where can I find chatgpt2api?
yukkcat/chatgpt2api is on GitHub at https://github.com/yukkcat/chatgpt2api.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.