Nodes/ComfyUI-dapaoAPI/🎨通用图像编辑API (测试版) @炮老师的小课堂
ComfyUI Node

🎨通用图像编辑API (测试版) @炮老师的小课堂

Aspect, HD presets, style presets, and a built-in upscaler

By paolaoshi·Created 10 months ago·Updated a day ago· 217
🎨通用图像编辑API (测试版) @炮老师的小课堂
  • 🖼️ 图像1
  • 🖼️ 图像2
  • 🖼️ 图像3
  • 🖼️ 图像4
  • image
  • response
  • image_url
  • raw_json
💬 提示词请根据这些图片进行专业的图像编辑
🌐 API地址https://api.tu-zi.com/v1/chat/completions
🔑 API密钥
🤖 模型名称gemini-3-pro-image-preview
📡 请求方法POST
🔐 密钥位置Header
📝 密钥字段名Authorization
📐 宽高比Auto
📊 响应模式TEXT_AND_IMAGE
🖥️ 输出分辨率Auto (Model Default)
🎨 画质预设hd
🎭 风格预设natural
🔍 放大倍数1x (不放大)
🧩 放大模型High Fidelity
🎯 系统角色
🎯 响应提取路径
⏱️ 超时时间180
📋 额外Headers{}
📦 额外Body参数{}

Some nodes are opinionated about the vendor. ImageEditAPINode ("🎨通用图像编辑API (测试版) @炮老师的小课堂") is opinionated about the workflow instead: it wraps a chat-completions-style multimodal image edit API - the kind Gemini 3 / Nano Banana 2 use - and layers on a pile of quality controls: aspect ratio, output resolution, quality presets, style presets, and an AI upscale stage with nine different upscale models. It's marked 测试版 (beta), and it shows: the default endpoint is a third-party relay (api.tu-zi.com), the model default is gemini-3-pro-image-preview, and the README points at a wiki page for that model. This is a "point it at whatever speaks this dialect" node with extra frosting.

The controls that matter

  • 💬 提示词 - the edit instruction. Plus 🎯 系统角色 if the endpoint supports it.
  • 🌐 API地址 / 🔑 API密钥 / 🤖 模型名称 - the trinity. Default model is gemini-3-pro-image-preview (Nano Banana 2 class), which is where the node's feature list makes most sense.
  • 📡 请求方法 / 🔐 密钥位置 / 📝 密钥字段名 - POST default, key in Header, field Authorization. Same flexible auth pattern as the universal API node.
  • 🖼️ 图像1–4 - up to four reference images for the edit.
  • 📐 宽高比 - Auto plus ten ratios.
  • 📊 响应模式 - TEXT_AND_IMAGE or IMAGE_ONLY.
  • 🖥️ 输出分辨率 - Auto / 1K / 2K / 4K. Tooltip is explicit: only supported by Nano Banana 2 (Gemini 3) models. On other models, leave it at Auto or you'll get a rejected call.
  • 🎨 画质预设 - standard / hd / ultra_hd / ai_enhanced / ai_ultra.
  • 🎭 风格预设 - vivid / natural / artistic / cinematic / photographic.
  • 🔍 放大倍数 - 1x (不放大) / 2x / 4x / 6x, with 🧩 放大模型 (High Fidelity, Standard, Art & CG, Lines, Very Compressed, Low Resolution, Text & Shapes, Redefine, Recover). The upscale runs as part of the same call.

Optional plumbing: 🎯 响应提取路径 (jq-style path into the response JSON), ⏱️ 超时时间, 📋 额外Headers, **📦 额外Body参数`. Outputs are the useful quartet: image (IMAGE), response (STRING), image_url, raw_json.

The honest picture

This node is a good example of the reseller ecosystem in action - it ships pointed at a relay, because that's how many people in this space reach Nano Banana 2 outside Google's own billing. That's fine, but it's exactly the scenario the KB's external-API essay flags: a node that holds your key and phones out by design. So treat the default endpoint as a suggestion, check what you're actually sending where, and remember the beta label means the mapping of presets to endpoints can change without notice. On the practical side: the 输出分辨率 field will bite you first - leave it on Auto unless you're certain the model supports 2K/4K. And if a call fails, raw_json is where the endpoint tells you what it didn't like.

Install

cd ComfyUI/custom_nodes/
git clone https://github.com/paolaoshi/ComfyUI-dapaoAPI.git
cd ComfyUI-dapaoAPI
pip install -r requirements.txt

Restart ComfyUI. No models download - the "models" here live on the endpoint you configure.

Category🤖dapaoAPI/🔮API通用工具🔮

Inputs (23)

NameTypeDefaultDescription
💬 提示词STRING请根据这些图片进行专业的图像编辑
🌐 API地址STRINGhttps://api.tu-zi.com/v1/chat/completions
🔑 API密钥STRING
🤖 模型名称STRINGgemini-3-pro-image-preview
📡 请求方法COMBOPOST3 options: POST, GET, PUT
🔐 密钥位置COMBOHeader3 options: Header, Query, Body
📝 密钥字段名STRINGAuthorization
🖼️ 图像1optIMAGE
🖼️ 图像2optIMAGE
🖼️ 图像3optIMAGE
🖼️ 图像4optIMAGE
📐 宽高比optCOMBOAuto11 options: Auto, 1:1, 2:3, 3:2, 3:4, 4:3, +5
📊 响应模式optCOMBOTEXT_AND_IMAGE2 options: TEXT_AND_IMAGE, IMAGE_ONLY
🖥️ 输出分辨率optCOMBOAuto (Model Default)仅支持 Nano Banana 2 (Gemini 3) 模型
🎨 画质预设optCOMBOhd5 options: standard, hd, ultra_hd, ai_enhanced, ai_ultra
🎭 风格预设optCOMBOnatural5 options: vivid, natural, artistic, cinematic, photographic
🔍 放大倍数optCOMBO1x (不放大)4 options: 1x (不放大), 2x, 4x, 6x
🧩 放大模型optCOMBOHigh Fidelity9 options: High Fidelity, Standard, Art & CG, Lines, Very Compressed, Low Resolution, +3
🎯 系统角色optSTRING
🎯 响应提取路径optSTRING
⏱️ 超时时间optINT1801–300
📋 额外HeadersoptSTRING{}
📦 额外Body参数optSTRING{}

Outputs (4)

NameTypeDescription
imageIMAGE
responseSTRING
image_urlSTRING
raw_jsonSTRING