chatgpt2api  by basketikun

OpenAI-compatible image API proxy for ChatGPT capabilities

Created 4 months ago
5,233 stars

Top 9.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project offers an OpenAI-compatible API proxy for ChatGPT's image generation and editing capabilities, targeting developers and researchers. It enables self-hosted image creation by reverse-engineering official ChatGPT web features, providing local control and an integrated drawing interface, while strictly prohibiting commercial use.

How It Works

Functionality is built on reverse-engineering ChatGPT's official website for image generation (/v1/images/generations), editing (/v1/images/edits), and related endpoints. A key feature is its robust account pool management system, which automatically refreshes accounts, detects invalid tokens, handles rate limits, and supports various import methods. An integrated web-based drawing workbench is also included.

Quick Start & Requirements

  • Primary install/run command: Clone the repo, configure config.json or use CHATGPT2API_AUTH_KEY env var, then run docker compose up -d.
  • Prerequisites: Docker is required. No other specific system requirements are detailed.
  • Links: No direct quick-start or demo links are provided beyond the repository itself.

Highlighted Details

  • OpenAI API Compatibility: Mimics OpenAI's image generation and editing APIs for easier integration.
  • Advanced Account Management: Features automatic account refreshing, invalid token detection, rate limit handling, proxy support, and multiple account import options.
  • Integrated Drawing Workbench: Includes a web UI for image generation, editing, and multi-image editing, supporting model selection and reference images.
  • Model Exposure: Exposes gpt-image-1 and the experimental gpt-image-2.

Maintenance & Community

The project acknowledges contributions from various developers. Community engagement is referenced via "LinuxDO," but specific links to Discord, Slack, or a public roadmap are absent. Development is ongoing, with experimental features noted.

Licensing & Compatibility

The project's license is not explicitly stated, posing a significant adoption blocker. A strong disclaimer prohibits commercial use, profit-making, mass operations, automated abuse, reselling services, or violating OpenAI's terms. It is intended strictly for personal learning, technical research, and non-commercial exchange.

Limitations & Caveats

This project relies on reverse-engineered APIs, carrying a substantial risk of account suspension by OpenAI. Users are strongly advised against using important accounts. The gpt-image-2 model is experimental and may be unstable. The lack of a specified license and the explicit prohibition of commercial use are critical limitations.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 30 days

Explore Similar Projects

Starred by Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

gpt4free by xtekky

0%
66k
API package for multi-provider LLM requests (GPT-4.1, Gemini 2.5, Deepseek R1)
Created 3 years ago
Updated 1 week ago
Feedback? Help us improve.