API Image Generator (UTK)
Generate images through an API right inside your workflow
- image
- controlnet_image
- image
- api_url
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
jimeng4before 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.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| provider | COMBO | placeholder | 选择API运营商 |
| api_key | STRING | API密钥 | |
| prompt | STRING | Generate a beautiful image | 图像生成提示词 |
| negative_prompt | STRING | 负面提示词 | |
| width | INT | 1024256–2048 | 生成图像宽度 |
| height | INT | 1024256–2048 | 生成图像高度 |
| steps | INT | 201–100 | 生成步数 |
| cfg_scale | FLOAT | 7.01–20 | CFG引导强度 |
| seed | INT | -1-1–2147483647 | 随机种子(-1为随机) |
| scheduler | COMBO | DDIM | 调度器类型 |
| model | COMBO | placeholder | 选择模型(即梦4.0: general=通用模型, portrait=人像模型) |
| imageopt | IMAGE | 输入图像(仅图生图或编辑模型时需要) | |
| controlnet_imageopt | IMAGE | ControlNet输入图像(可选) | |
| controlnet_typeopt | COMBO | none | ControlNet类型 |
| controlnet_strengthopt | FLOAT | 1.00–2 | ControlNet强度 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| api_url | STRING | — |