ComfyUI Node

Dall-E Custom API Node

DALL-E 3 in your graph, through any OpenAI-compatible endpoint

By AhBumm·Created 2 years ago·Updated 3 months ago· 11
Dall-E Custom API Node
    • b64_url
    • revised_prompt
    prompt
    modeldall-e-3
    size
    quality
    style
    n1
    seed0
    api_urlhttps://api.hyprlab.io/v1
    api_keyYOUR_API_KEY_HERE

    Want to drop a DALL-E 3 call into the middle of a ComfyUI workflow without writing a single line of Python? That's this node. It's a thin wrapper around the OpenAI images.generate endpoint - which means it's really an "OpenAI-compatible image generation" node wearing DALL-E's name. Point it at OpenAI, or at any third-party endpoint that speaks the same protocol, and it just works.

    How it works

    Under the hood it builds an OpenAI client from your api_url and api_key, then calls client.images.generate() with response_format="b64_json". The image comes back as base64, gets wrapped in a data:image/png;base64, URL, and pops out as a STRING called b64_url. OpenAI also returns a revised_prompt - DALL-E 3 rewrites your prompt internally for safety/quality - and the node hands that back too, which is genuinely useful if you want to see what the model actually generated from.

    It retries on the transient stuff (connection errors, rate limits, timeouts, 5xx) with exponential backoff up to five attempts. That matters because image APIs rate-limit constantly when you're batch-generating.

    The inputs that matter

    Most of them map 1:1 to the DALL-E API, so if you've used it, you know the drill:

    • prompt - the text, obviously.
    • model - defaults to dall-e-3. This is a free-form string, so it's also how you'd target a compatible third-party model.
    • size - 1024x1024, 512x512, or 256x256.
    • quality - hd vs standard. HD costs double; for a lot of prompts you honestly won't see it.
    • style - None, vivid, or natural. The None option is the pack's way of letting you skip sending the parameter at all.
    • n - 1 to 4 images.
    • seed - note this seeds Python's random, not the actual model. DALL-E's API doesn't really honor seeds, so don't expect reproducible outputs; the input is mostly there for workflow bookkeeping.
    • api_url and api_key - the two that will actually bite you. The default api_url points at https://api.hyprlab.io/v1, a third-party aggregator that has almost no community footprint. If you don't have a HyprLab account, this is the first thing to change.

    The two outputs are b64_url (a STRING data URL - not an image!) and revised_prompt (STRING). Feed b64_url into the pack's Load Image from URL (BillBum) or Base64 URL to Image node to get a real IMAGE tensor.

    Installing it

    Part of the AhBumm/ComfyUI_BillBum_APIset_Nodes pack. In ComfyUI Manager, search "billbum" and install "Customizable API Call Nodes by 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 afterwards. Dependencies are just the standard API stack (openai, requests, pillow, tenacity) - no model downloads.

    Common issues

    The three usual suspects:

    • "That's not DALL-E" errors. The endpoint has to actually support images.generate with the model you named. OpenAI itself: fine. Some cheaper aggregators only implement chat endpoints, not image generation, and will 404 or complain about the model.
    • The API key / base URL mismatch. Every node in this pack defaults to some provider or other; if you forgot to swap api_url, you're sending your key to a service you may not even have an account with.
    • DALL-E's content filters. It's the most heavily moderated of the mainstream image APIs. If a prompt trips the filter you'll get an error or a rewritten prompt you didn't ask for - that's the model, not the node.

    One honest caveat: DALL-E 3 is a 2023 model and OpenAI has long since moved on - GPT Image 1 (which this pack also wraps) renders text and edits images far better. Use this node if your workflow specifically targets DALL-E 3, or if you're on a third-party platform that only offers it. Otherwise the GPT Image 1 node is the better spend of your API credits.

    CategoryBillBum_API

    Inputs (9)

    NameTypeDefaultDescription
    promptSTRING
    modelSTRINGdall-e-3
    sizeCOMBO3 options: 1024x1024, 512x512, 256x256
    qualityCOMBO2 options: hd, standard
    styleCOMBO3 options: None, vivid, natural
    nINT11–4
    seedINT00–18446744073709550000
    api_urlSTRINGhttps://api.hyprlab.io/v1
    api_keySTRINGYOUR_API_KEY_HERE

    Outputs (2)

    NameTypeDescription
    b64_urlSTRING
    revised_promptSTRING