chatgpt2api  by yukkcat

OpenAI-compatible API gateway for ChatGPT features

Created 2 months ago
336 stars

Top 81.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides a self-hostable, OpenAI-compatible API gateway by reverse-engineering the ChatGPT official website protocol. It targets engineers and power users needing to integrate ChatGPT's text and image capabilities, offering advanced multi-account management, robust image handling, and a comprehensive administrative console for flexible self-hosted deployments.

How It Works

The core architecture reverse-engineers ChatGPT's web protocol to expose an OpenAI-compatible API supporting text, image generation/editing, and web search. Key features include sophisticated multi-account scheduling, proxy group management, detailed image pipeline diagnostics, and an integrated Vue-based management console. This approach aims for a superior self-hosted experience for high-concurrency image workloads and complex account management.

Quick Start & Requirements

Installation is streamlined via a one-click curl script or Docker Compose. Prerequisites include Docker and basic command-line tools. Optional WARP, Privoxy, and FlareSolverr integration enhances Cloudflare stability. The project exposes a local web panel (e.g., http://localhost:3000) and an OpenAI-compatible API endpoint (e.g., http://localhost:3000/v1).

Highlighted Details

  • OpenAI Compatibility: Endpoints for chat completions, image generation/editing, search, and editable file tasks.
  • Integrated Workbench: Unified UI for text conversations, image generation, and task management.
  • Image Diagnostics: Detailed logging and real-time monitoring for troubleshooting image generation.
  • Multi-Account Management: Supports importing, grouping, proxy configuration, and auto-removal of invalid accounts.
  • Account Registration: Tools for managing and expanding email account pools.
  • Proxy & Stability: Integrates WARP, Privoxy, and FlareSolverr for network restriction handling.
  • Flexible Deployment: Docker, scripts, and various data storage backends (JSON, SQLite, PostgreSQL, Git).

Maintenance & Community

Actively maintained, with v2.6.2 noted as stable. Community support via QQ group (https://qm.qq.com/q/yegwCqJisS). Release notes in CHANGELOG.md.

Licensing & Compatibility

Usage is strictly for personal learning, technical research, and non-commercial exchange. Commercial use, profit-making, mass operations, service reselling, and violations of OpenAI ToS or local laws are prohibited. Users assume all risks, including account bans.

Limitations & Caveats

Reverse-engineered, dependent on unofficial protocols, susceptible to breakage. Significant risk of account suspension/bans. Commercial use forbidden; stability may vary.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
6
Star History
250 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.0%
66k
API package for multi-provider LLM requests (GPT-4.1, Gemini 2.5, Deepseek R1)
Created 3 years ago
Updated 2 days ago
Feedback? Help us improve.