Comfyui_gpt_image_1
Gpt-image-1 in ComfyUI without the OpenAI bill shock
- generated_image
- response
OpenAI's gpt-image-1 is one of the few closed models people actually miss when they go fully local - it nails text-in-image and follows instructions like nothing open weights could for a long while. Comfyui_gpt_image_1 is a text-to-image client for it that runs inside ComfyUI, pointed at a discounted proxy rather than OpenAI's own endpoint. No local model, no GPU work, no checkpoint to download. If you've got a key from the pack's upstream service, this is the cheapest way to get official gpt-image-1 generations into a real workflow.
How it works
The node builds a JSON payload and POSTs it to https://ai.comfly.chat/v1/images/generations with your API key as a Bearer token. The response - base64 or a URL - gets decoded, turned into a tensor, and handed off. That's the whole mechanism: one requests.post, a 300s timeout, and out comes an IMAGE you can wire into a Save Image node or keep processing like any other ComfyUI image.
The catch worth knowing: the seed input exists, but the code literally logs "Seed not used by API". gpt-image-1 doesn't expose seed control through this route, so stop hunting for reproducible outputs and lean on the prompt instead.
Inputs that matter
Only prompt is required. The rest are the ones you'll actually touch:
quality-auto,high,medium,low. Low is the budget route and for a lot of draft work it's fine.size-autoor1024x1024,1536x1024,1024x1536.background-auto,transparent,opaque.transparentis gpt-image-1's party trick for extracting cutout assets with alpha; that alone is worth trying.output_format- png / jpeg / webp.moderation-autoorlow;lowloosens the content filter.n- 1–10 images per call. More images, more money.api_key- leave empty and it readsComflyapi.json; enter one and it gets saved there.
Outputs are generated_image (the IMAGE tensor) and response (a STRING that logs the prompt, settings, and a token-usage breakdown - handy if you're watching spend).
The key gotcha: which key group
This is the bit that trips everyone up. The pack has two key tiers, and they are not interchangeable. The cheap "reverse-engineered" group that works with ComfyuiChatGPTApi will fail here - the README is explicit that the three official groups (the author says ssvip is currently the best deal) are the only ones that work with the two gpt_image_1 nodes. They're faster and more stable than the reverse tier, but they cost more. Sign up at ai.comfly.chat, grab a key from an official group, and don't mix them up.
Install
Same story as the whole pack, which is one repo with three nodes. Easiest: ComfyUI Manager → Install Custom Nodes → search "Comfyui-chatgpt-api" → Install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/Comfyui-chatgpt-api
Restart, done. Dependencies are aiohttp, requests, numpy, Pillow, torch, GitPython - you already have nearly all of it. No models to download.
Troubleshooting
- API error, or a blank white image returned - usually a wrong key group or no key. Verify it's an official-group key, not the reverse-group one.
- Timeout after ~300s - unlike the edit sibling, this node has no retry logic; a slow group can just drop the request. Re-run the graph.
- "Seed not used by API" - not a bug. It's informational.
Bottom line: for occasional official-quality generations inside a ComfyUI graph, this works and beats the OpenAI website's price. Just don't expect seed reproducibility or local control - this is a cloud model with training wheels, and the wheels are someone else's servers.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| api_keyopt | STRING | — | |
| modelopt | STRING | gpt-image-1 | — |
| nopt | INT | 11–10 | — |
| qualityopt | COMBO | auto | 4 options: auto, high, medium, low |
| sizeopt | COMBO | auto | 4 options: auto, 1024x1024, 1536x1024, 1024x1536 |
| backgroundopt | COMBO | auto | 3 options: auto, transparent, opaque |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
| moderationopt | COMBO | auto | 2 options: auto, low |
| seedopt | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| generated_image | IMAGE | — |
| response | STRING | — |