How ihozaifazia/chatgpt-image-genration-browser-automation works
This service accepts image prompts over HTTP, automates ChatGPT in a persistent Chrome profile, and returns PNG bytes while archiving each result for later retrieval. The main path is n8n → server validation and single-task control → browser generation and download → response and archive. Health and API documentation are separate service capabilities. Source excerpts show the server’s calls into the queue, generator, session manager, and OpenAPI spec; README documents ChatGPT automation and archive behavior. The automation’s detailed intermediate UI steps are only partly sampled.
Main entry points: server.js HTTP server · generateImage.js Prompt automation · queue.js Single-task lock · sessionManager.js Persistent browser session
Components 11
HTTP API
- HTTP server
server.js - Health endpoint
server.js - API specification
openapi.js - Last-image endpoint
server.js
Image generation
- Prompt automation
scripts/generateImage.js - PNG archive
scripts/generateImage.js
Browser runtime
- Single-task lock
scripts/queue.js - Persistent browser session
scripts/sessionManager.js
Other components
- n8n caller
- ChatGPT web UI
- Automation Chrome
Connections 14
- n8n caller → HTTP server: sends prompt
README.md - HTTP server → Single-task lock: checks and enqueues
server.js - HTTP server → Prompt automation: invokes
server.js - Single-task lock → Prompt automation: runs task
server.js - Prompt automation → Persistent browser session: gets context
scripts/generateImage.js - Persistent browser session → Automation Chrome: launches context
scripts/sessionManager.js - Prompt automation → ChatGPT web UI: automates UI
README.md - ChatGPT web UI → Prompt automation: provides image
README.md - Prompt automation → PNG archive: saves PNG
README.md - HTTP server → n8n caller: returns PNG
README.md - HTTP server → Last-image endpoint: routes retrieval
server.js - Last-image endpoint → PNG archive: reads latest PNG
server.js - HTTP server → Health endpoint: serves status
server.js - HTTP server → API specification: serves specification
server.js