GPT Image Bridge · Codex OAuth Provider
GPT image generation without an API key — the Codex OAuth Provider, decoded
- provider
The name undersells it. GPT Image Bridge · Codex OAuth Provider is the node that lets you generate images with OpenAI's GPT Image models without an API key, without a billing account, without any token you have to paste anywhere. If you've ever logged into Codex CLI (or any Codex client) on the same machine, this node just works. It's the pack's party trick, and it's the reason the pack exists.
Normally "closed model inside ComfyUI" means setting up an API key, a base URL, and a metered bill - the official ComfyUI path to GPT Image runs on prepaid Partner-Node credits. This node is a side door: it reuses the OAuth session your Codex login already created. If your ChatGPT/Codex subscription covers image generation, that's your access, with no key to manage.
How it actually works
It reads the standard Codex login file. The node looks for auth.json in $CODEX_HOME if that environment variable is set, otherwise ~/.codex/auth.json - the exact file codex login writes. Find it, and it extracts the OAuth tokens, refreshes them as needed, and talks directly to ChatGPT's Codex image endpoint.
Three design choices are worth calling out because they're what make this trustworthy rather than scary:
- It doesn't run anything extra. No Node.js, no
npx, no local proxy, no downloaded npm package. It's plain HTTP againstchatgpt.com/backend-api/codex. - It writes the refreshed token back into the same
auth.json, atomically, so your Codex client keeps working afterward. It's not stealing your login; it's sharing it. - Nothing sensitive touches the workflow. No token, no auth file path, no browser data, no keychain scan. If the node can't find a login, it tells you to run Codex login, and it won't dump your local absolute paths into errors.
The inputs and output
model is a string, defaulting to gpt-image-2 - that's the current OpenAI image model. api_protocol has three choices: auto, responses, or images (no chat_completions here - the OAuth path doesn't do that). Leave auto and let the node decide: OAuth Generate routes to /responses, OAuth Edit routes to /images/edits.
The output is a single provider handle (type GPT_IMAGE_PROVIDER), same as the API Provider node produces. That's the whole node - two inputs, one output. Wire provider into either GPT Image Bridge · Generate or GPT Image Bridge · Edit.
There are OAuth-specific limits baked in that are worth knowing before you hit them: the Codex Edit path accepts at most 5 ordered images (Image 1 base plus 4 references), and it doesn't support mask or output_format - the node ignores those and notes it in the request report rather than failing.
Getting logged in
If the node errors saying it can't find credentials, that's not a node bug - you don't have a Codex login yet. Install Codex CLI, log in once:
codex login
That writes the auth.json the node reads. Then reload ComfyUI and the node should find it automatically. Any client that produces the standard Codex login file works; only an app's private login that never wrote a standard auth.json is invisible to it.
Install & notes
Same as the rest of the pack: ComfyUI Manager (search GPT Image Bridge) or
cd ComfyUI/custom_nodes
git clone https://github.com/Liu-Bot24/comfyui-gpt-image-bridge.git ComfyUI-GPT-Image-Bridge
cd ComfyUI-GPT-Image-Bridge && python -m pip install -r requirements.txt
then restart. Only numpy and Pillow, no model files to download - this is the whole point, the model lives on OpenAI's servers. There is no free lunch here: you're still burning your ChatGPT/Codex subscription quota per image, your prompt and reference images still leave the machine, and OpenAI's content moderation applies at the source. The OAuth path just removes the key-management friction, not the bill or the filter. It's a genuinely clever mechanism, and for a pack this new (v0.5.2, 2026) with a clean, security-conscious posture, it's the node I'd actually reach for - if you already live in Codex, this is the least-friction way to get GPT Image output back into a ComfyUI graph.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | STRING | gpt-image-2 | — |
| api_protocol | COMBO | auto | 3 options: auto, responses, images |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| provider | GPT_IMAGE_PROVIDER | — |