Thanks for your interest! This project is a CDP-driven reverse proxy for ChatGPT's web interface, and contributions are welcome.
git clone https://github.com/Elephant-Rock-Lab/ChatGPT-Web2API.git
cd ChatGPT-Web2API
pip install -e ".[dev]"- Chrome + ChatGPT: You need a ChatGPT Plus account and Chrome installed locally.
- Run the proxy:
chatgpt-web2api— logs in on first run, starts API server. - Test:
pytest(unit tests) or manualcurlagainstlocalhost:8080.
Open an issue with:
- What you expected
- What happened instead
- Steps to reproduce (Chrome version, OS, ChatGPT account type)
- Relevant logs (
--log-level DEBUG)
- Fork the repo
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Add tests if applicable
- Ensure
pytestpasses - Submit a PR with a clear description of what changed and why
- Python 3.11+, type hints preferred
- Async everywhere (
async/await, no blocking calls in event loop) - Docstrings on public functions and classes
- Keep the CDP driver methods pure — business logic belongs in
mcp_server.pyorapi_server.py
src/chatgpt_web2api/
__main__.py CLI entrypoint
config.py Configuration from file/env/CLI
chrome.py Chrome subprocess lifecycle
cdp_driver.py CDP primitives (type, click, stream, API fetch)
api_server.py OpenAI-compatible HTTP server
mcp_server.py MCP server (tools, resources, prompts)
service.py Orchestrator: Chrome → CDP → API
- Testing: More comprehensive test coverage (currently relying on live Chrome sessions)
- Memory endpoint discovery:
POST /backend-api/memoriesreturns 405 — the actual write endpoint is unknown - Headless support: Headless Chrome likely triggers anti-bot detection
- Image/file upload: CDP-based file upload to conversations and projects
- Retry logic: Better recovery from Chrome disconnections and token expiry
- CI/CD: GitHub Actions for automated testing
Be respectful. Be constructive. Focus on the code and the problem.