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

πŸ€– Leon Recraft Image API

Recraft's style presets, without the website

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Recraft Image API
    • image
    • image_url
    • seed
    β—„promptcatβ–Ί
    β—„modelrecraft-v3β–Ί
    β—„output_formatwebpβ–Ί
    β—„seed0β–Ί
    β—„api_urlhttps://api.hyprlab.io/v1/images/generationsβ–Ί
    β—„api_keyYOUR_API_KEY_HEREβ–Ί
    β—„response_formaturlβ–Ί
    β—„size1024x1024β–Ί
    β—„stylerealistic_imageβ–Ί

    Recraft is the model you reach for when the job isn't "photorealistic" but "looks like it was designed" - crisp illustrations, pixel art, hand-drawn line work, the kind of stylistic control most text-to-image models can't hold. Its flagship recraft-v3 lives behind an API, and this node brings it into ComfyUI through the pack's HyprLab base: type a prompt, pick a style from the dropdown, and get back an image with that exact illustration flavor baked in. If you've ever fought a local model for an hour trying to get consistent flat-vector output, you'll get why a node like this exists.

    How it works

    Same shared machinery as the rest of the pack's API nodes - HyprLabImageGenerationNodeBase builds an OpenAI-style payload, POSTs to https://api.hyprlab.io/v1/images/generations with a Bearer token, retries with exponential backoff (up to five attempts), and decodes the result into an RGBA tensor. What makes this node different is what goes in the payload: a style field and a size field, both as enums, both doing the heavy creative lifting.

    Inputs that matter

    • style - the reason to use this node. 23 options, default realistic_image, but the interesting half is the digital_illustration family: pixel_art, hand_drawn, grain, infantile_sketch, 2d_art_poster, handmade_3d, hand_drawn_outline, engraving_color, 2d_art_poster_2, and more. Pick the illustration style here instead of describing it in the prompt; that's what the model is actually good at.
    • size - 15 options from 1024x1024 up to 2048x2048-class dimensions (1024x2048, 2048x1024, etc.). Recraft sizes are preset, not arbitrary - pick the closest to what you need.
    • prompt - capped at 10,000 characters per the tooltip, and it's the usual "what's in the scene" description. Keep the style words out; the style enum owns that job.

    Outputs: image, image_url, seed - the pack's standard triple.

    Installing

    ComfyUI Manager (search Leon) or clone:

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

    Restart and paste a HyprLab key. The dependencies are light and there are no model files - this node is a remote render, so your GPU stays idle while it works.

    Common issues

    The standard API-node failures apply - swap the default YOUR_API_KEY_HERE key, watch the console for the logged request when a 4xx comes back. Style-wise, the two traps are overlapping: putting "pixel art" in the prompt and selecting pixel_art in the enum usually fights the model, and the default output format here is webp, not png - if a downstream node chokes, flip output_format to png. And because the style presets are the point, experiment there first before touching the prompt; two minutes of dropdown-browsing teaches you more about recraft-v3 than an hour of prompt edits.

    CategoryLeon_API

    Inputs (9)

    NameTypeDefaultDescription
    promptSTRINGcatMain text that influences the image generation (max 10,000 characters)
    modelCOMBOrecraft-v3Recraft AI model to use for generation
    output_formatCOMBOwebpFormat 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
    sizeoptCOMBO1024x1024Dimensions of the generated image
    styleoptCOMBOrealistic_imageArtistic style or filter applied to the generated image

    Outputs (3)

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