GPT img OAuth Generate
ChatGPT image generation through your Plus subscription — no API key, no per-image bill
- reference_image
- image
- revised_prompt
Here's the node people actually search for. "Can I use ChatGPT through ComfyUI?" - yes, and GPT img OAuth Generate is the answer that doesn't charge you per image. Where the API version bills an OpenAI key for every generation, this one authenticates with your existing ChatGPT/Codex login and runs the same image_generation pipeline against your subscription. You already pay for ChatGPT; this node lets your ComfyUI workflows spend it.
There's real demand for exactly this - the recurring r/comfyui question is how to get the ChatGPT-website image quality inside a workflow without metering every run. This is the "log in once, generate" answer. It's also the unofficial one: it rides the OAuth proxy rather than a supported API surface, so treat it as a tool, not a promise.
How it works
The node needs a local OAuth proxy talking to OpenAI's Responses API. On run, it checks http://127.0.0.1:<oauth_port>/v1/models. If nothing's there and auto_start_oauth is on, it spawns npx -y openai-oauth --port <port> and waits up to 45 seconds for it to come up, logging to custom_nodes/GPT-img/logs/openai-oauth.log. The request then streams through that proxy the same way the API node hits the real endpoint, and the base64 image comes back as a normal ComfyUI IMAGE.
The inputs that matter
prompt- the image you want.model- the OAuth list is slightly different from the API list:gpt-5.4,gpt-5.4-mini,gpt-5.5. Defaults togpt-5.4.oauth_port- default 10531. Change it only if that port's busy.auto_start_oauth- on by default; turn it off if you're running the proxy yourself.n- 1 to 8 images, each a separate request through the proxy.size,quality,moderation- same options as the API node.
Optional reference_image (up to 5 frames) plus system_prompt_input/user_prompt_input sockets that override the widgets.
Outputs
image- the result as a ComfyUI IMAGE.revised_prompt- the prompt OpenAI actually used.
Install
Two steps beyond the clone:
cd ComfyUI/custom_nodes
git clone https://github.com/hub2vu/Comfyui-GPT-img-node.git GPT-img
OAuth nodes need Node.js with npx. Log in once if you haven't:
npx @openai/codex login
Restart ComfyUI. Manager may not list the pack yet - the registry version is still Pending - so manual clone is the reliable path.
Common issues
If you get "openai-oauth exited while starting" or "did not become ready," that log file is your friend - read it, then run npx @openai/codex login and retry. If you're on a system without Node.js, nothing OAuth will work; install Node first. The proxy binds to localhost, and you want to keep it that way - exposing your ComfyUI instance (or this proxy) to the internet with your ChatGPT login behind it is how accounts get drained. Keep the defaults.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | a cinematic image | — |
| model | COMBO | gpt-5.4 | 3 options: gpt-5.4, gpt-5.4-mini, gpt-5.5 |
| quality | COMBO | medium | 3 options: low, medium, high |
| size | COMBO | 1024x1024 | 13 options: 1024x1024, 1536x1024, 1024x1536, 1360x1024, 1024x1360, 1824x1024, +7 |
| moderation | COMBO | low | 2 options: low, auto |
| n | INT | 11–8 | — |
| oauth_port | INT | 105311024–65535 | — |
| auto_start_oauth | BOOLEAN | true | — |
| timeout_sec | INT | 30030–3600 | — |
| system_prompt | STRING | You are an image generation assistant. Use the image_generation tool to create the requested image. Preserve the user's prompt, requested style, language, subject, and composition as closely as possible. Return image output, not explanatory text. | — |
| system_prompt_inputopt | STRING | — | |
| user_prompt_inputopt | STRING | — | |
| reference_imageopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| revised_prompt | STRING | — |