Nodes/GPT img/GPT img OAuth ChatGPT LLM
ComfyUI Node

GPT img OAuth ChatGPT LLM

ChatGPT as a ComfyUI text node, billed to your subscription instead of your API meter

By hub2vu·Created 4 months ago·Updated 4 months ago· 3
GPT img OAuth ChatGPT LLM
    • text
    • raw_response_json
    system_promptYou are a helpful assistant.
    promptWrite a short answer.
    modelgpt-5.5
    reasoning_effortmedium
    max_output_tokens2048
    oauth_port10531
    auto_start_oauthtrue
    timeout_sec300
    system_prompt_input
    user_prompt_input

    Same idea as GPT img API ChatGPT LLM - send a prompt to a ChatGPT model, get text back as a ComfyUI STRING - but authenticated through your ChatGPT/Codex login instead of an API key. For anyone who already pays for ChatGPT, this is the version that makes the node feel free: no key, no per-token billing, just your subscription doing the work.

    It slots into a workflow like any text node: feed it a captioning task, have it write a negative prompt, summarize what an upstream node decided. The output wires straight into whatever accepts a STRING.

    How it works

    The node makes sure the local OAuth proxy is up on 127.0.0.1:10531 (auto-starting npx -y openai-oauth if auto_start_oauth is on, waiting up to 45 seconds, logging to custom_nodes/GPT-img/logs/openai-oauth.log). Then it sends your system_prompt as a developer message and prompt as the user message to OpenAI's Responses API through that proxy, with reasoning set to your reasoning_effort and the reply capped by max_output_tokens. The text comes back, and the full response is kept for you.

    The inputs that matter

    • prompt - the actual request; the one you'll edit every run.
    • system_prompt - role instructions, "You are a helpful assistant" by default.
    • model - includes gpt-5.5-pro (default is gpt-5.5) for heavier reasoning.
    • reasoning_effort - minimal to xhigh; medium default, raise for hard questions.
    • max_output_tokens - output budget, default 2048.
    • oauth_port / auto_start_oauth - proxy control; defaults are fine.

    Optional system_prompt_input and user_prompt_input sockets override the widgets when connected.

    Outputs

    • text - the answer, a STRING you can route anywhere.
    • raw_response_json - the full response object for inspection.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/hub2vu/Comfyui-GPT-img-node.git GPT-img
    

    OAuth nodes need Node.js with npx, and a one-time login:

    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. No Python dependencies.

    Common issues

    Missing Node.js is the wall most people hit; the error message says npx wasn't found. If the proxy starts but never becomes ready, read the log and re-run the login. Long generations can exceed the default 300-second timeout_sec - bump it to 3600 if you're asking for long-form output with high reasoning effort. And keep the proxy on localhost; you don't want your ChatGPT login reachable from the network.

    CategoryGPT img

    Inputs (10)

    NameTypeDefaultDescription
    system_promptSTRINGYou are a helpful assistant.
    promptSTRINGWrite a short answer.
    modelCOMBOgpt-5.54 options: gpt-5.5-pro, gpt-5.5, gpt-5.4, gpt-5.4-mini
    reasoning_effortCOMBOmedium5 options: minimal, low, medium, high, xhigh
    max_output_tokensINT204816–128000
    oauth_portINT105311024–65535
    auto_start_oauthBOOLEANtrue
    timeout_secINT30030–3600
    system_prompt_inputoptSTRING
    user_prompt_inputoptSTRING

    Outputs (2)

    NameTypeDescription
    textSTRING
    raw_response_jsonSTRING