lanqian528/chat2api — reverse-engineered prompt
Reverse engineered prompt
Build me a small self hosted service that makes ChatGPT on the web behave like an OpenAI compatible API. I want a normal chat completions endpoint that returns the same kind of response format clients already expect, with both streaming and non streaming support. It should let people use free GPT 3.5 without logging in, and also support passing an AccessToken or RefreshToken for newer models like GPT 4, 4o, 4o mini, O1, O3, and GPTs. It should handle image and file uploads too, and support team workspace use with an account id when provided.
Please also include simple token management so I can upload, clear, rotate, and retry across multiple saved tokens. If possible, add the optional web gateway mode that looks like the official site, with a login page, direct token login by URL, isolated sessions by seed, and language switching.
Make it easy to run locally or in Docker, use safe defaults from environment variables, and add clear setup notes and basic troubleshooting. Look up the current project docs online if you need to.
Want more depth? Deep Reverse