This article was originally published on aifoss.dev
TL;DR: ComfyUI's built-in HTTP server accepts workflow JSON on port 8188 — the same JSON the GUI exports when you click "Save (API Format)". You can queue a prompt, poll for completion, and download the result in under 50 lines of Python. No GUI, no browser tab, no manual clicking.
What you'll have running after this guide:
A Python function that submits any ComfyUI workflow and blocks until images are downloaded locally
A batch script that generates 100 images with automated seed variation and organized output folders






