Nodes/ComfyUI-UniversalToolkit/API Image Generator (UTK)
ComfyUI Node

API Image Generator (UTK)

Generate images through an API right inside your workflow

By whmc76·Created about a year ago·Updated about a month ago· 72
API Image Generator (UTK)
  • image
  • controlnet_image
  • image
  • api_url
providerplaceholder
api_key
promptGenerate a beautiful image
negative_prompt
width1024
height1024
steps20
cfg_scale7.0
seed-1
schedulerDDIM
modelplaceholder
controlnet_typenone
controlnet_strength1.0

Sometimes you want a cloud model's output mid-workflow - for a style your GPU can't run, or because you're prototyping against a commercial API. API Image Generator (UTK) is a wrapper node that calls an image-generation API from inside ComfyUI and hands the result back as a normal image tensor. The catch, and you should hear it up front: right now it has exactly one real provider, and it's a paid one.

The honest state of the node

The provider dropdown lists placeholder and jimeng4. placeholder is exactly what it sounds like - a stub that returns a fake URL so the plumbing can be tested without spending money. The real option is jimeng4, which calls ByteDance's Seedream 4.0 through the Volcengine Ark API (ark.cn-beijing.volces.com/api/v3/seedream-4.0). Seedream is ByteDance's closed, API-only image line, so this needs a Volcengine account and an API key. No key, no images.

So: this is a niche node for people who already have (or want) a Jimeng/Seedream API subscription. If that's not you, skip it - it's the one node in the pack that isn't local.

The inputs that matter

  • provider - jimeng4 (the only real one), plus the placeholder stub.
  • api_key - paste your Volcengine Ark key. This is the thing that will bite you first.
  • prompt / negative_prompt - standard. The tooltips are in Chinese (图像生成提示词 / 负面提示词) since this pack leans on the Chinese ecosystem.
  • width / height (default 1024), steps (20), cfg_scale (7), seed (default -1 = random), scheduler (DDIM/DDPM/DPM++ 2M), model (jimeng4-general / jimeng4-portrait).

Optional inputs: image (for img2img), plus controlnet_image, controlnet_type, and controlnet_strength for ControlNet passes through the API - assuming your chosen API supports them.

Outputs

Two: image (the generated result as a normal IMAGE you can feed straight into the rest of your graph) and api_url (the endpoint that was called - handy for debugging or billing checks).

Installing it

Standard pack install - ComfyUI Manager → search ComfyUI-UniversalToolkit, or:

cd ComfyUI/custom_nodes
git clone https://github.com/whmc76/ComfyUI-UniversalToolkit
cd ComfyUI-UniversalToolkit && pip install -r requirements.txt

Then restart. Needs requests, which is in the pack requirements.

Gotchas

  • It's a paid API call. Every run of this node spends real money and takes a network round-trip. Don't wire it into a loop and walk away.
  • The key lives in the workflow JSON. Workflows are shared as images with embedded JSON; paste your API key and share that workflow and you've leaked the key. Use an environment variable or a dedicated node for secrets if you share anything.
  • The placeholder provider is a trap if you're not careful - it returns a fake image/URL and no error, so a workflow can "work" while producing garbage. Check that provider is actually set to jimeng4 before troubleshooting everything else.
  • China-region API - the endpoint is a Beijing region Ark URL; if you're outside that region your key may not be authorized. That's a Volcengine account question, not a node bug.

Useful if you're already in the Jimeng/Seedream ecosystem. If you're not, this is the one node in the pack you can ignore without losing anything - everything else here is local.

CategoryUniversalToolkit/Tools

Inputs (15)

NameTypeDefaultDescription
providerCOMBOplaceholder选择API运营商
api_keySTRINGAPI密钥
promptSTRINGGenerate a beautiful image图像生成提示词
negative_promptSTRING负面提示词
widthINT1024256–2048生成图像宽度
heightINT1024256–2048生成图像高度
stepsINT201–100生成步数
cfg_scaleFLOAT7.01–20CFG引导强度
seedINT-1-1–2147483647随机种子(-1为随机)
schedulerCOMBODDIM调度器类型
modelCOMBOplaceholder选择模型(即梦4.0: general=通用模型, portrait=人像模型)
imageoptIMAGE输入图像(仅图生图或编辑模型时需要)
controlnet_imageoptIMAGEControlNet输入图像(可选)
controlnet_typeoptCOMBOnoneControlNet类型
controlnet_strengthoptFLOAT1.00–2ControlNet强度

Outputs (2)

NameTypeDescription
imageIMAGE
api_urlSTRING