ComfyUI Node

Custom Recraft API Node

Recraft v3 through an OpenAI-compatible endpoint — when you need words in the image

By AhBumm·Created 2 years ago·Updated 3 months ago· 11
Custom Recraft API Node
    • image_url
    prompt
    modelrecraft-v3
    size
    seed0
    api_urlhttps://api.hyprlab.io/v1/images/generations
    api_keyYOUR_API_KEY_HERE
    style_type

    Recraft is the model line you reach for when legible text in an image actually matters - typography, lettering, vector-style illustration - the stuff diffusion models usually mangle into mush. Custom Recraft API Node is the pack's preconfigured doorway to it: an image-generation node whose request payload is shaped for Recraft, pointed by default at an OpenAI-compatible aggregator that serves it.

    The honest framing first: this node doesn't call Recraft's official API. It POSTs to the api_url you give it using the same images/generations shape the pack's other image nodes use. The default URL is HyprLab, the author's aggregator of choice. If you have a key for a provider that serves recraft-v3 - or the model name your endpoint actually uses - swap the URL and key and it just works. That's the whole philosophy of this pack: the node is glue, the provider is your choice.

    How it works

    It's a single requests.post with a JSON body built from your inputs - model, prompt, size, and style (that's where the style_type dropdown maps to - the payload field is literally called style), plus response_format: "url" and output_format: "webp". It expects the standard OpenAI-style response envelope, reads data[0]["url"], and returns that URL. tenacity retries on connection errors and timeouts, three attempts, so a hiccup won't nuke the run.

    The inputs that matter

    • prompt - what you want drawn.
    • model - default recraft-v3; change it if your provider names it differently.
    • size - a 15-option dropdown of resolutions, from 1024x1024 up through 2048x1024.
    • style_type - the 23-option style dropdown: digital_illustration and its children (pixel_art, hand_drawn, grain...), realistic_image variants (b_and_w, hard_flash, studio_portrait...), and vector_illustration (engraving, line_art, linocut). These are Recraft's own style vocabulary, and they're the whole point - pick vector_illustration and you get the clean flat look the model is known for.
    • seed - reproducibility.
    • api_url / api_key - the provider and its key. Defaults are HyprLab + YOUR_API_KEY_HERE, so both need attention.

    Output: image_url (STRING). Note that - it's a URL string, not an IMAGE tensor. To get pixels on a wire you chain it into a load-image-from-URL node (the pack ships one, "Load Image from URL (BillBum)", and it also accepts data URIs if your provider returns those instead).

    Installing it

    Part of AhBumm/ComfyUI_BillBum_Nodes - ComfyUI Manager search "billbum", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AhBumm/ComfyUI_BillBum_APIset_Nodes.git
    cd ComfyUI_BillBum_APIset_Nodes && pip install -r requirements.txt
    

    Restart ComfyUI. Deps are light - requests, pillow, numpy - no models to download. This is an API node; the "model" lives on the server, not on your disk.

    Where people get burned

    • Default URL vs. your key. HyprLab is the default; if you set it to a generic OpenAI-compatible endpoint, remember that plain GPT-image-style endpoints won't understand Recraft's style field. This node is tuned for providers that speak Recraft-ish payloads.
    • Style dropdown is provider-dependent. A random images endpoint may ignore style silently. If output looks generic, your provider isn't honoring Recraft styles.
    • Output is a URL. Don't wire image_url straight into an img2img node expecting IMAGE - convert first.
    • Recraft's calling card is text rendering; if that's not what you need, the pack's other image nodes are less opinionated about style.
    CategoryBillBum_API

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRING
    modelSTRINGrecraft-v3
    sizeCOMBO15 options: 1024x1024, 1365x1024, 1024x1365, 1536x1024, 1024x1536, 1820x1024, +9
    seedINT00–18446744073709550000
    api_urlSTRINGhttps://api.hyprlab.io/v1/images/generations
    api_keySTRINGYOUR_API_KEY_HERE
    style_typeCOMBO23 options: digital_illustration, digital_illustration/pixel_art, digital_illustration/hand_drawn, digital_illustration/grain, digital_illustration/infantile_sketch, digital_illustration/2d_art_poster, +17

    Outputs (1)

    NameTypeDescription
    image_urlSTRING