Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Google Image API
ComfyUI Node

πŸ€– Leon Google Image API

Google Imagen 4 from your ComfyUI graph β€” a one-node trip to Gemini's image stack

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Google Image API
    • image
    • image_url
    • seed
    β—„promptA beautiful landscape with mountains and a lakeβ–Ί
    β—„modelimagen-4-ultraβ–Ί
    β—„aspect_ratio1:1β–Ί
    β—„output_formatpngβ–Ί
    β—„seed0β–Ί
    β—„api_urlhttps://api.hyprlab.io/v1/images/generationsβ–Ί
    β—„api_keyYOUR_API_KEY_HEREβ–Ί
    β—„response_formaturlβ–Ί

    Leon Google Image API is the pack's Imagen node, and it's also the simplest one in the whole pack - which is kind of its charm. No optional parameters at all. You get a prompt, a model dropdown, an aspect ratio, an output format, a seed, the API URL and key, and a response format. Fill those in and out comes a Google Imagen image as a ComfyUI tensor. If you want to try Imagen 4 without a local model and without learning yet another API SDK, this is the shortest on-ramp there is.

    It's also the node the pack's own example workflow is built around - a bare Leon_Google_Image_API_Node β†’ PreviewImage + ShowText graph - so it's the pack author's reference "hello world". That tells you something about how the rest of the pack is intended to behave: same three outputs (image, image_url, seed), same retry-on-failure base class, same model-family abstraction.

    How it works

    The node builds a JSON payload and POSTs it to https://api.hyprlab.io/v1/images/generations with a Bearer token - HyprLab is the reseller here, not Google directly. The response is downloaded and converted to an RGBA tensor, so it drops straight into PreviewImage, SaveImage, or anything downstream.

    The inputs that matter:

    • model - imagen-4-ultra (default), imagen-4, imagen-4-fast, imagen-3, imagen-3-fast. Imagen 4 is the current line; the ultra/fast split is the usual quality-versus-speed trade. The Imagen 3 options are there if you want the cheaper, older behavior.
    • prompt - max 10,000 characters, which is generous. Imagen is a strong natural-language follower; descriptive sentences beat tag soup here.
    • aspect_ratio - 1:1, 3:4, 4:3, 9:16, 16:9. No match_input_image and no ultrawide options - this is a deliberately small menu.
    • response_format - url (default) or b64_json. With url, the node downloads the image itself and image_url comes back as a hosted URL; with b64_json you get a data URI in image_url instead.

    That's the whole surface. There's no image-input socket, no negative prompt, no steps - if you need editing or multi-image guidance, Imagen's relatives in this pack (the Nano Banana nodes) are where that lives.

    Installing it

    The standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/l3ony2k/comfyui-leon-nodes
    pip install -r requirements.txt
    

    Restart ComfyUI, or install "ComfyUI Leon Nodes" from ComfyUI Manager. Dependencies are light and there are no models to download.

    Where people get burned

    The recurring theme: the YOUR_API_KEY_HERE default is a placeholder, and because failures retry with backoff, a wrong key means a slow death rather than a fast one - watch the console. Imagen is also a heavily filtered model (it's Google, so expect content moderation baked in), and the "no optional parameters" simplicity means you can't tune your way out of a censorship refusal - you just get a different image or an error. And keep expectations honest: this routes through HyprLab, a small paid aggregator with barely any public community footprint, so troubleshooting means provider docs, not a Reddit thread. For a clean single-image Imagen generation, this is exactly as easy as it looks.

    CategoryLeon_API

    Inputs (8)

    NameTypeDefaultDescription
    promptSTRINGA beautiful landscape with mountains and a lakeMain text input to guide the generation process (max 10,000 characters)
    modelCOMBOimagen-4-ultraGoogle Imagen model to use for generation
    aspect_ratioCOMBO1:1Aspect ratio of the generated image
    output_formatCOMBOpngFormat of the output image
    seedINT00–18446744073709550000Random seed for reproducible results
    api_urlSTRINGhttps://api.hyprlab.io/v1/images/generationsAPI URL
    api_keySTRINGYOUR_API_KEY_HEREYour HyprLab API key
    response_formatCOMBOurlHow the response data should be formatted

    Outputs (3)

    NameTypeDescription
    imageIMAGEβ€”
    image_urlSTRINGβ€”
    seedINTβ€”