Nodes/GPT img/GPT img OAuth Generate
ComfyUI Node

GPT img OAuth Generate

ChatGPT image generation through your Plus subscription — no API key, no per-image bill

By hub2vu·Created 4 months ago·Updated 4 months ago· 3
GPT img OAuth Generate
  • reference_image
  • image
  • revised_prompt
prompta cinematic image
modelgpt-5.4
qualitymedium
size1024x1024
moderationlow
n1
oauth_port10531
auto_start_oauthtrue
timeout_sec300
system_promptYou 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_input
user_prompt_input

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 to gpt-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.

CategoryGPT img

Inputs (13)

NameTypeDefaultDescription
promptSTRINGa cinematic image
modelCOMBOgpt-5.43 options: gpt-5.4, gpt-5.4-mini, gpt-5.5
qualityCOMBOmedium3 options: low, medium, high
sizeCOMBO1024x102413 options: 1024x1024, 1536x1024, 1024x1536, 1360x1024, 1024x1360, 1824x1024, +7
moderationCOMBOlow2 options: low, auto
nINT11–8
oauth_portINT105311024–65535
auto_start_oauthBOOLEANtrue
timeout_secINT30030–3600
system_promptSTRINGYou 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_inputoptSTRING
user_prompt_inputoptSTRING
reference_imageoptIMAGE

Outputs (2)

NameTypeDescription
imageIMAGE
revised_promptSTRING