# lanqian528/chat2api

A service that can convert ChatGPT on the web to OpenAI API format.

Repository: https://github.com/lanqian528/chat2api
Canonical: https://ross.abutalabs.com/products/chat2api
Language: Python
License: MIT
License Family: permissive
Last push: 2025-05-17T10:06:41+00:00

## Health v2 (maintenance only)
Score: 35/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 22, release rhythm 35, longevity 62
- inputs: {"age_days": 881, "days_push": 473, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3794, forks 729 (observed 2026-08-28T04:08:18.953752+00:00)

## What it is
A Python service that proxies ChatGPT's web interface into an OpenAI-compatible API format, supporting GPT-3.5, GPT-4/4o, O1/O3 models, GPTs, and file uploads. It also provides a native ChatGPT website mirror with account pooling and token management.

## Use cases
- use chatgpt web account as an openai-compatible api
- expose gpt-4 via openai api format without official key
- self-host a chatgpt to api gateway
- rotate multiple chatgpt tokens for api access
- mirror the chatgpt website with account pool
- use gpts and o1 models through openai sdk clients

## When to choose
- you have ChatGPT web accounts (AccessToken/RefreshToken) and want OpenAI-format API access
- you need compatibility with existing OpenAI API clients
- you want multi-account token rotation and a self-hosted gateway

## When to avoid
- you need a fully official, ToS-compliant OpenAI API
- you need guaranteed uptime or SLA, since this relies on unofficial reverse-engineered endpoints
- you don't have ChatGPT accounts or tokens

## Facets
- artifact type: service
- maturity: active
- function: proxy, api-framework, http-server, llm-inference, chatbot
- domain: large-language-models, apis, self-hosted, artificial-intelligence
- platform: self-hosted, python
- tags: reverse-proxy, openai-api-compatibility, chatgpt, token-pooling, unofficial-api, docker, web-server

## Member repositories
- lanqian528/chat2api (main) score 35

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:18.953752+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:26:58.476412+00:00, confidence not recorded.
  - readme: https://github.com/lanqian528/chat2api (fetched 2026-08-28T04:08:18.953752+00:00, sha 59d6b8c7ef56)
- Data as of 2026-08-30T08:39:29.467469+00:00.
