ChatGPT-to-API  by acheong08

Unofficial ChatGPT API for production use

created 2 years ago
1,126 stars

Top 34.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a scalable, unofficial API for ChatGPT, designed for production use by developers needing to integrate ChatGPT's capabilities into their applications. It offers a familiar OpenAI-compatible endpoint, simplifying integration and allowing for programmatic access to ChatGPT's conversational AI.

How It Works

The API acts as a proxy, interacting with the ChatGPT website to generate responses. It automates authentication using email and password for OpenAI accounts, storing and renewing access tokens. For GPT-4 access and to bypass CAPTCHA, it requires a HAR file captured from a browser session on chat.openai.com. The system supports custom API keys and can utilize proxies to manage rate limits and IP availability.

Quick Start & Requirements

  • Install: git clone https://github.com/acheong08/ChatGPT-to-API && cd ChatGPT-to-API && go build && ./freechatgpt
  • Prerequisites: Go, accounts.txt (email:password), optionally HAR file (chat.openai.com.har) for GPT-4, optionally proxies.txt.
  • Setup: Requires manual capture of HAR file for GPT-4.

Highlighted Details

  • OpenAI-compatible API endpoint: http://127.0.0.1:8080/v1/chat/completions
  • Automated access token and PUID retrieval and renewal.
  • Support for custom API keys for the unofficial API.
  • Optional proxy support for enhanced availability.

Maintenance & Community

The project is maintained by acheong08. Documentation is limited, with more details available in Chinese.

Licensing & Compatibility

The repository does not explicitly state a license.

Limitations & Caveats

This is an unofficial API and may break if OpenAI changes its website structure. The author explicitly states no free support will be provided. Authentication requires valid OpenAI account credentials and may be sensitive to IP blocking. GPT-4 usage necessitates a HAR file, which requires manual generation.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.