Zhenzhen ChatGPT Api
The OpenAI chat-and-image workhorse of the Comfly pack
- files
- images
- images
- response
- image_urls
- chats
This is the node that started the Comfly pack, and it shows - ComflyChatGPTApi is a chat-completions client that can also generate and edit images, all through one interface. It's OpenAI-style, so the workflow is: type a prompt (with an image attached if you want editing), pay for the call, get images back. The README is refreshingly honest that the original route here was a reverse-engineered (逆向) API - cheap but not rock-solid - which is why the author now nudges you toward the gpt-image-1 model and keeps the older gpt4o-image, gpt4o-image-vip, sora_image, and sora_image-vip options around as backups. At roughly 0.06 RMB a pop it's cheap enough to experiment with; the site's free trial credit is enough for a few runs.
The inputs that matter
- prompt - required. This doubles as your edit instruction when you attach images.
- model - a free-text string, default
gpt-4o-image. The README's advice: prefergpt-image-1. - images / image_url - attach local images or a URL. Attach one and the prompt becomes an edit; attach several and it becomes multi-image reference.
- temperature, top_p, max_tokens, frequency_penalty, presence_penalty - the standard OpenAI knobs, defaults are sane.
- seed - -1 for random, or lock it.
- clear_chats - the one that changes behavior the most.
true(default) treats each run in isolation: whatever image you feed gets edited, no conversation memory. Flip tofalseand the node keeps context, so you can iterate on the same image across runs - thechatsoutput carries the multi-turn conversation forward. - image_download_timeout - how long it waits for the result image, default 600s. These calls aren't fast; don't lower it out of impatience.
Outputs: images (IMAGE), response (the raw text reply), image_urls, and chats for feeding context into the next run.
Install
Shared with the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/Comfyui_Comfly
Or ComfyUI Manager → search "Comfyui_Comfly" → restart. No models to download - it's an HTTP client. Account and credits at https://ai.comfly.chat, key in Comflyapi.json or per-node.
Gotchas
Speed, mostly. The README warns it's not fast, and the response text may come back before the images finish rendering - hence the image_download_timeout. If a run returns text but no image, check that timeout and the relay log before re-paying. Also, files is a FILES input the author explicitly calls out as unfinished ("先忽略" - ignore for now), so don't build a workflow around it. And keep in mind this is a third-party paid relay: for anything production-grade you'd move to Comfly's official-API nodes like Comfly_gpt_image_2_official, which are pricier but stabler.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| model | STRING | gpt-4o-image | — |
| api_keyopt | STRING | — | |
| filesopt | FILES | — | |
| image_urlopt | STRING | — | |
| imagesopt | IMAGE | — | |
| temperatureopt | FLOAT | 0.700–2 | — |
| max_tokensopt | INT | 40961–16384 | — |
| top_popt | FLOAT | 1.000–1 | — |
| frequency_penaltyopt | FLOAT | -2.00-2–2 | — |
| presence_penaltyopt | FLOAT | 0.00-2–2 | — |
| seedopt | INT | -1-1–2147483647 | — |
| image_download_timeoutopt | INT | 600300–1200 | — |
| clear_chatsopt | BOOLEAN | true | — |
| skip_erroropt | BOOLEAN | false | 开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。 |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| response | STRING | — |
| image_urls | STRING | — |
| chats | STRING | — |