GPT Image Bridge · API Provider
The settings node that actually sends your images to GPT — API Provider, explained
- provider
The GPT Image Bridge · API Provider node is the boring one in the pack, and it's the one you'll configure first. It doesn't generate anything. It holds the credentials and routing rules - API key, base URL, model, protocol - and hands a provider output to the Generate and Edit nodes. Think of it as the passport that lets the rest of the pack talk to a server. It's an API wrapper, not a sampler: no checkpoint, no VAE, no GPU work, and nothing runs until a Generate or Edit node actually executes.
The pack sits in the "closed model inside your Comfy graph" camp. GPT Image has no open weights, so the only door is an API call - the same category as the official ComfyUI Partner Nodes, but with your own key and your own choice of endpoint instead of Comfy's prepaid-credit storefront. That's the pitch: bring the model you can't download into the workflow next to your local upscaler, your masks, your everything else.
What you actually set
The four required fields are all strings. api_key is what you'd expect (it renders as a masked password field on the canvas; click it to edit). base_url is the server root - https://api.openai.com/v1 style; paste a root URL or one that already ends in /v1, the node normalizes the trailing slash and refuses to build a v1/v1. model is the model name, e.g. gpt-image-2. api_protocol has four choices: auto, responses, images, chat_completions. Leave it on auto unless your provider needs a specific protocol - the node picks based on what you're doing (more in the Generate/Edit articles).
The rest are toggles and text boxes you can safely ignore until a provider forces you to touch them:
use_async(default on) - prefers the Images async task endpoints and only falls back to a sync call if the server explicitly returns 404/405/501 before a task ID exists. Turn it off for suppliers that only do synchronous calls.use_custom_endpoints(default off) - the master switch for the whole custom-endpoint cluster. Off, none of those fields do anything.generate_endpoint/edit_endpoint- relative paths or same-origin full URLs for sync calls, read only when the custom-endpoint switch is on.async_generate_endpoint/async_edit_endpoint/async_poll_endpoint_template/async_mapping_json- the deep end: non-standard async submit paths, a poll template with exactly one{task_id}, and an RFC 6901 JSON Pointer map for suppliers whose responses don't look like OpenAI's. Only bother if a vendor actually needs them.
The single output is provider (type GPT_IMAGE_PROVIDER), which wires straight into Generate or Edit. It's not an image - it's a config handle, so don't route it anywhere else.
The security detail that's worth a nod
API-wrapper nodes carry a credential and phone home by design - the exact shape of node that got weaponized once in this ecosystem - so it's notable that this pack keeps your key out of your workflow. When you queue, the frontend swaps the key for a one-time in-memory session handle before submitting to Comfy's queue, so the plaintext never lands in queue history or in the metadata stamped onto saved images. Reports redact Authorization, tokens, and base64 image payloads.
The flip side: the key is saved in your local workflow JSON. Before you share a workflow, clear the API key, base URL, model, and any custom endpoints from this node. Turning off use_custom_endpoints doesn't erase the saved text; it just stops it from executing.
Install
Via ComfyUI Manager, search GPT Image Bridge or comfyui-gpt-image-bridge, install, restart. Or from a terminal:
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 ComfyUI. The only dependencies are numpy and Pillow, and there are no model downloads - nothing to weigh out, no first-run checkpoint fetch. It's on the ComfyUI Registry too (comfy node install comfyui-gpt-image-bridge).
Troubleshooting
- "The API Key must be submitted through the protected node widget" - the frontend extension didn't load (stale tab or the page re-registered after you opened it). Reload ComfyUI, re-enter the key, queue again.
- Auth/429/5xx errors - the node deliberately does not auto-retry requests that could create a paid image task (a 429 isn't a fallback trigger), to avoid double-billing when the server may already have created a job. Check the
request_reportoutput on Generate/Edit for a redacted status, request ID, and error type. - HTTP redirects & cross-origin - requests with an Authorization header don't follow redirects, so point
base_urlat the final endpoint; full custom URLs must share the origin withbase_url, and endpoint query params that look like credentials get refused. Both are features, not bugs. It's a young pack (v0.5.2, 2026) with zero community footprint yet, so treat the docs as the contract andrequest_reportas your debugging window - it tells you which protocol, endpoint, and timing actually ran.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | — | |
| model | STRING | — | |
| api_protocol | COMBO | auto | 4 options: auto, responses, images, chat_completions |
| use_custom_endpointsopt | BOOLEAN | false | 关闭时忽略所有自定义同步/异步端点和响应映射,使用所选协议的标准路径与标准响应格式。 |
| generate_endpointopt | STRING | 仅在“使用自定义端点”开启时生效。填写同步端点;异步开关会按标准 Images 路径派生异步端点。 | |
| edit_endpointopt | STRING | 仅在“使用自定义端点”开启时生效。填写同步端点;异步开关会按标准 Images 路径派生异步端点。 | |
| use_asyncopt | BOOLEAN | true | 优先使用 Images 异步任务端点;仅在服务明确表示不支持时安全回退同步。 |
| async_generate_endpointopt | STRING | 可选。开启自定义端点和异步后生效;填写供应商真实的异步生成 POST 端点,留空时按标准 Images 路径派生。 | |
| async_edit_endpointopt | STRING | 可选。开启自定义端点和异步后生效;填写供应商真实的异步编辑 POST 端点,留空时按标准 Images 路径派生。 | |
| async_poll_endpoint_templateopt | STRING | 可选。必须恰好包含一个 {task_id},例如 jobs/{task_id} 或 jobs?id={task_id};轮询固定使用 GET。 | |
| async_mapping_jsonopt | STRING | 可选。使用受限 RFC 6901 JSON Pointer 映射任务 ID、状态、结果和图片字段;不支持脚本或 JSONPath。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| provider | GPT_IMAGE_PROVIDER | — |