Nodes/Comfyui-zhenzhen/Zhenzhen ChatGPT Api
ComfyUI Node

Zhenzhen ChatGPT Api

The OpenAI chat-and-image workhorse of the Comfly pack

By T8mars·Created 12 months ago·Updated 2 days ago· 719
Zhenzhen ChatGPT Api
  • files
  • images
  • images
  • response
  • image_urls
  • chats
prompt
modelgpt-4o-image
api_key
image_url
temperature0.70
max_tokens4096
top_p1.00
frequency_penalty-2.00
presence_penalty0.00
seed-1
image_download_timeout600
clear_chatstrue
skip_errorfalse

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: prefer gpt-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 to false and the node keeps context, so you can iterate on the same image across runs - the chats output 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.

Categoryzhenzhen/Openai

Inputs (15)

NameTypeDefaultDescription
promptSTRING
modelSTRINGgpt-4o-image
api_keyoptSTRING
filesoptFILES
image_urloptSTRING
imagesoptIMAGE
temperatureoptFLOAT0.700–2
max_tokensoptINT40961–16384
top_poptFLOAT1.000–1
frequency_penaltyoptFLOAT-2.00-2–2
presence_penaltyoptFLOAT0.00-2–2
seedoptINT-1-1–2147483647
image_download_timeoutoptINT600300–1200
clear_chatsoptBOOLEANtrue
skip_erroroptBOOLEANfalse开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。

Outputs (4)

NameTypeDescription
imagesIMAGE
responseSTRING
image_urlsSTRING
chatsSTRING