imagen4
The Google Image Model That Just Makes a Picture
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it's for
Imagen 4 is Google's straight text-to-image generator - no chat, no image editing, no thinking mode. You give it a prompt, it gives you a picture. That sounds underwhelming next to Nano Banana, which is the model that ate the community's attention for most of 2026, but it's also the point: sometimes you don't want a conversational model that reinterprets your intent. You want the image, rendered the way you described it.
It's also the cheaper, plainer path. If you're generating a hundred loose concepts and you don't need reference-image conditioning or 4K output, a plain T2I model is the right tool. The trade you're making is capability for predictability.
Since Imagen has no open weights, there's no local version and never will be - this node exists precisely because that's true. Everything else in the graph can stay local; this one call goes out.
How it works
The node submits your prompt to KIE's Imagen 4 endpoint with your saved API key, then waits for the task to finish and maps the result into native ComfyUI media. That last part is the pack's main selling point: you get an IMAGE socket, not a URL you have to paste somewhere. Internally the pack downloads the returned image into a tensor, which is why you can plug this straight into a mask, an upscaler, or an img2img pass without any file juggling.
It also returns the raw URLs, so nothing is hidden if you want to fetch the files yourself, and it keeps the task ID and the full provider response for debugging. The credits consumed and your remaining balance come back as floats and are also drawn as a receipt on the node body - genuinely handy on a metered API, because it stops you discovering your spend at the end of the month.
Inputs and outputs
Required: prompt - the image description, max 5000 characters per the tooltip. The default value is a comic-strip prompt about Imagen 4 called "the best text-to-image tool out there," which is KIE's own marketing example and a fun reminder of whose docs these nodes are generated from. Overwrite it.
Optional:
negative_prompt- what to discourage, also capped at 5000 characters. Plenty of hosted image models quietly ignore negatives; here it's a documented field, so use it.aspect_ratio- one of1:1,16:9,9:16,3:4,4:3, orauto. Theautooption lets the prompt decide, which is occasionally what you want and usually a coin flip.seed- and here's a quirk worth catching: it's a STRING field, not an int. The tooltip says "Random seed for reproducible generation (Max length: 500 characters)." If you like rigging up an int-based seed node, expect to convert it to text first.timeout_seconds- INT, default 1200, range 30–7200, step 30. Your patience budget for the job.callback_url- leave it empty for normal ComfyUI use; it's for building an out-of-graph callback flow.
Outputs: image (IMAGE), url, all_urls_json, task_id, raw_json (all STRING), and credits_consumed / credits_left (FLOAT). Wire image downstream; use url if you need the link for something outside Comfy.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
Restart ComfyUI, then set your key at Settings → KIE.ai Nodes Next → Connection. The pack validates the key against KIE before replacing a working one, then shows a masked fingerprint and a CONNECTED status; the full key never goes into your workflow JSON, which matters if you share graphs. KIE_API_KEY covers headless installs.
Dependencies are requests, Pillow, numpy, PyYAML. No weights, no CUDA - the GPU work happens at KIE, not at home. Windows users can run the installer in dist/ to have the pack placed for them.
Where people get burned
Cost, first and always. Reseller APIs are metered per call, and this whole category's recurring complaint is that the real price only becomes visible when you run a batch. Iterate on a cheap tier, commit with the good model.
Second, the seed type. People wire an int seed, get a validation error, and conclude the node is broken. It's a string field; convert it.
Third, expectations about what Imagen will do for you. It's T2I - no image input, no editing, no reference conditioning. Those are different nodes in this pack, and a large chunk of the "why doesn't it match my reference" complaints are really "I picked a text-to-image model for an image-to-image job."
Finally, the standard security frame for any API node: a node that holds your key and calls the network by design is exactly the shape of the one credential-stealing pack this ecosystem has already seen. Read what a pack does before it runs, and prefer ones that keep the key out of the workspace - this pack does.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A lively comic scene where two colleagues are in an office. The first person says, 'Have you heard about Google Imagen 4 Ultra?' The second person responds with excitement, 'It’s the best text-to-image tool out there!' The first person asks again, 'Do you know where to get the API?' The second person smiles and says, 'Kie.ai has it!' In the final panel, the two look at a screen showing Kie.ai’s interface with an API option, with bright and colorful comic-style illustrations. | The text prompt describing what you want to see (Max length: 5000 characters) |
| negative_promptopt | STRING | A description of what to discourage in the generated images (Max length: 5000 characters) | |
| aspect_ratioopt | COMBO | 1:1 | The aspect ratio of the generated image |
| seedopt | STRING | Random seed for reproducible generation (Max length: 500 characters) | |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |