yukkcat/chatgpt2api

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

What it solves

ChatGPT2API provides a way to access the capabilities of the official ChatGPT website through an OpenAI-compatible API. It allows users to self-host a gateway that manages multiple accounts, handles image generation tasks, and provides a management console for monitoring and configuration.

How it works

The project uses reverse engineering to interface with the ChatGPT web interface. It acts as a middleware that translates OpenAI-compatible API requests (such as /v1/chat/completions and /v1/images/generations) into actions on the ChatGPT web platform. It includes a scheduler for account rotation, proxy management for different accounts, and a database (SQLite or PostgreSQL) to track logs, metrics, and account status.

Who it’s for

Developers and users who want to use ChatGPT's web-based features (including image generation and search) via an API without using the official OpenAI API, or those who need to manage a pool of multiple accounts to distribute load and avoid rate limits.

Highlights

  • OpenAI Compatible API: Supports Chat Completions, Responses, and image generation/editing endpoints.
  • Multi-Account Management: Supports various authentication methods (OAuth, Access Tokens, Session JSON) and account rotation/failover.
  • Image & File Handling: Dedicated support for text-to-image, image-to-image, and the generation of editable files like PPT and PSD.
  • Management Console: A Vue-based web UI for monitoring real-time requests, managing proxies, and tracking account health.
  • Flexible Storage: Supports local storage or WebDAV for generated assets and SQLite or PostgreSQL 18 for application data.
  • Prompt Library: Built-in local and cloud-synced prompt assets for easier task management.

Related

  • Project
  • Project
  • Project
  • Project
  • Dispatch