Nodes/KIE.ai Nodes Next/imagen4-ultra
ComfyUI Node

imagen4-ultra

Google's Poster Model, Billed by the Call

By felipederosilva·Created about a month ago·Updated a day ago· 3
imagen4-ultra
    • image
    • url
    • all_urls_json
    • task_id
    • raw_json
    • credits_consumed
    • credits_left
    ◄promptA 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.►
    ◄negative_prompt►
    ◄aspect_ratio1:1►
    ◄seed►
    ◄timeout_seconds1200►
    ◄callback_url►

    What this node actually is

    It's a network call wearing a ComfyUI costume. There's no checkpoint, no VRAM cost, nothing to download - the node packages your prompt, ships it to KIE.ai, waits for Google's Imagen 4 Ultra to finish, and drops the returned image back into the graph as a normal IMAGE tensor. From the canvas it looks like any other generator; underneath it's an HTTP client holding your API key.

    Imagen 4 Ultra is the top of Google's Imagen line: the slow, expensive tier that's best at long prompts, layout, and text that renders as actual legible words. That last one is why you'd reach for it. If your workflow has ever spent an afternoon fighting a local model to put a clean product label or a poster headline into an image, an Ultra call is the shortcut. It's also the right tool when you want the closed model inside the graph - feeding your own upscaler, your own masking, your own save nodes - rather than copying files out of a web UI.

    The one thing to know before you start: this is pay-per-call through a reseller, not your electricity bill. KIE proxies Google's models rather than serving them itself, and the pack's whole reason for existing is that routing to a reseller is often cheaper and easier to pay for than the first-party API.

    How it works

    The pack builds its node classes at startup from KIE's published API documentation, which is why the class name ends in a hash - KIE_Next_google_imagen4_ultra_324052ed. That suffix is derived from the model and its docs URL, and it's how the pack keeps node IDs stable across releases.

    When you run it, the pack POSTs a job to KIE's createTask endpoint with the market model id google/imagen4-ultra plus your inputs, then polls KIE's recordInfo endpoint until the task reports success, downloads the resulting URL, and converts it to a tensor. If the task is successful but the URL hasn't landed yet, it keeps polling briefly instead of throwing a false error. Retries and backoff are built in for the transient stuff (429s, 5xx, network blips).

    The inputs you'll actually touch

    prompt is required and capped at 5000 characters. The default in the box is a KIE marketing comic about KIE - a giveaway that the defaults are lifted straight from the vendor's documentation. Replace it.

    negative_prompt is worth noticing, because plenty of hosted models don't take one at all. Imagen here does, so use it for the usual suspects: text artifacts, extra fingers, watermarks.

    aspect_ratio gives you 1:1, 16:9, 9:16, 3:4, 4:3, and auto. auto hands the decision to the model based on your prompt, which is occasionally clever and usually just unpredictable - pin it if you're compositing.

    seed is a string here, not an integer, which is a quirk of how the field is documented rather than a design choice. Paste a number in.

    timeout_seconds defaults to 1200 (twenty minutes) and can go as low as 30 and as high as 7200. Ultra is slow. Leave it alone unless you're batching on a deadline and want failures early.

    callback_url is for servers that want KIE to push results to them. Leave it empty; on a normal ComfyUI install the node is already waiting for the answer.

    Outputs

    image is the main one - wire it to Save Image, a preview, or an upscaler. Alongside it you get url (the raw KIE link), all_urls_json (every URL the task returned, useful if a job ever returns more than one image), task_id, raw_json (the provider's full response - the thing you read when something looks wrong), credits_consumed, and credits_left. The last two also flash up on the node itself as a receipt after each run, which is the fastest way to notice a workflow that's quietly costing more than you thought.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    cd ComfyUI-KIE-Nodes-Next
    pip install -r requirements.txt
    

    Restart ComfyUI. Dependencies are light - requests, Pillow, numpy, PyYAML - no CUDA, no compilation, no model files. The README also ships a Windows one-click installer and a ZIP in dist/, and says Registry/Manager publishing is "prepared" rather than done: if Manager's search comes up empty for this pack, that's why.

    Then the key, once: Settings → KIE.ai Nodes Next → Connection → Paste / replace KIE.ai API key. It's validated against KIE before it overwrites anything, and afterwards you see a masked fingerprint and a CONNECTED status - never the key itself, which lives in the ComfyUI user data folder rather than your workflow JSON. Headless setups can use KIE_API_KEY instead, which takes priority.

    Where people get burned

    The most common failure is the boring one: no key, or a key saved in the settings box but never confirmed, and the node throws a "no KIE API key configured" error that tells you exactly where to go. Fix it there.

    Second: opening ComfyUI and not finding the node. The pack builds most of its nodes from a live catalog sync on first launch, so the menu populates after a refresh. If imagen4-ultra isn't listed, restart once, or run the pack's Refresh Model Catalog node.

    Third: don't retry a timed-out job blindly. Every attempt that reaches KIE is a paid attempt, and Ultra is the priciest tier here. Check task_id in the KIE dashboard before firing again - you may already own the result.

    And the honest caveat for the whole category: prompts leave your machine, the provider's filter applies and can't be patched out, and a node that holds your key and phones home by design is exactly the shape of thing worth reading before its first run.

    CategoryKIE Next/Image/Google/Imagen

    Inputs (6)

    NameTypeDefaultDescription
    promptSTRINGA 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_promptoptSTRINGA description of what to discourage in the generated images (Max length: 5000 characters)
    aspect_ratiooptCOMBO1:1The aspect ratio of the generated image
    seedoptSTRINGRandom seed for reproducible generation (Max length: 500 characters)
    timeout_secondsoptINT120030–7200—
    callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

    Outputs (7)

    NameTypeDescription
    imageIMAGE—
    urlSTRING—
    all_urls_jsonSTRING—
    task_idSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    credits_leftFLOAT—