basketikun/chatgpt2api

ChatGPT官网接口纯协议的逆向实现,支持GPT-Image-2模型、文本模型,兼容OpenAI接口协议,在线批量生图/编辑图,号池管理,支持可编辑PPT/PSD文件逆向,支持导入CPA、sub2api号池 、支持接入Cherry Studio、New Api 等软件

What it solves

It provides a way to access ChatGPT's official image generation and editing capabilities via an OpenAI-compatible API. It solves the problem of integrating these specific web-based features into other applications or clients that expect a standard API format, while also managing multiple accounts to handle rate limits.

How it works

The project reverse-engineers the ChatGPT official website's interfaces to encapsulate image generation and editing functions. It acts as a proxy that accepts OpenAI-standard API requests and translates them into calls to the ChatGPT web interface. It includes a management system for account pools, automatic token refreshing, and support for various proxy setups (like WARP and FlareSolverr) to bypass Cloudflare protections.

Who it’s for

Developers who want to integrate ChatGPT's image generation and editing tools into their own software, or users who want to use third-party AI clients (like Cherry Studio or New API) to access these features using a pool of accounts.

Highlights

  • OpenAI API Compatibility: Supports standard endpoints for image generation (/v1/images/generations) and editing (/v1/images/edits).
  • Account Pool Management: Features automatic account refreshing, rotation, and support for multiple import methods (CPA JSON, remote servers, etc.).
  • Built-in Workbench: Includes a web-based interface for generating and editing images with session history.
  • Advanced Proxy Support: Integrates WARP, Privoxy, and FlareSolverr to maintain stable connections and bypass bot detection.
  • Flexible Storage: Supports multiple backends for data storage, including JSON, SQLite, PostgreSQL, and private Git repositories.

Related

  • Project
  • Project
  • Project
  • Project
  • Project