ComfyUI Node

LumaAI Client

The one node everything else in this pack hangs off — get the key in once

By lumalabs·Created 2 years ago·Updated about a year ago· 213
LumaAI Client
    • client
    api_key

    Every other node in the LumaAI pack takes a client input, and LumaAIClient is the only node that produces one. Think of it as the power cable: you wire it into the top of every LumaText2Video, LumaImage2Video, LumaImageGeneration, or upscale/extend node, and it carries your API key along with it. No client, no generations - the whole graph just sits there with the missing-input red.

    It's a deliberately boring node. There's one string input (api_key) and one output (client of type LUMACLIENT). What happens under the hood is that it instantiates the official lumaai Python client with your auth token, and ComfyUI keeps that object alive for the rest of the graph. The node class is registered as LumaAI Client in the LumaAI category.

    The order of fallback for the key is worth knowing, because it decides how you handle secrets. If you leave api_key blank, it checks the LUMAAI_API_KEY environment variable, and then the config.ini file sitting in the pack's folder. The README's suggested setup is to put your key in config.ini ([API] LUMAAI_API_KEY = ...) and leave the node input empty - which is the right move, because otherwise you're pasting a live key into a workflow JSON that ComfyUI embeds into every PNG you save. If you share a workflow with your key baked into the node, you're handing out credentials. Get it into config.ini or an environment variable and you can share graphs without a thought.

    Where people get burned: every generation in this pack runs on Luma's paid, credit-based API, and there's no free tier to fall back on. If the key is missing or wrong you'll get a ValueError: API Key is required at queue time, before anything is charged - that one's safe. The dangerous one is a valid key with a low credit balance, because an expensive generation failing halfway can still eat credits. Check your balance at the Dream Machine API console before you queue up a batch.

    How to install it

    The client node comes with the pack, so install the pack once and you get all fourteen nodes:

    • ComfyUI Manager - search "ComfyUI-LumaAI-API" (or "LumaAI") and install.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/lumalabs/ComfyUI-LumaAI-API, then on Windows portable run .\python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-LumaAI-API\requirements.txt; on Linux/macOS run cd ComfyUI-LumaAI-API && pip install -r requirements.txt.
    • Comfy Registry - comfy node registry-install comfyui-lumaai-api.

    Dependencies are just lumaai==1.7.0, requests, numpy, and Pillow - no model downloads, no VRAM requirements, because the actual generation happens in Luma's cloud, not on your machine. Restart ComfyUI after installing.

    Common issues

    • "API Key is required" - the input is empty and there's no key in LUMAAI_API_KEY or config.ini. Also check you edited the config.ini in the pack directory, not a copy elsewhere.
    • Key leak by accident - if you've already built workflows with the key in a node, ComfyUI Manager's "Clean Removed Nodes" won't help; just re-save those workflows with an empty input after moving the key to config.ini.
    • One client per graph is enough - you don't need a fresh client per node. One LumaAIClient can feed every generation node in the workflow, which keeps things tidy and gives you a single place to see the key is set.
    CategoryLumaAI

    Inputs (1)

    NameTypeDefaultDescription
    api_keySTRING

    Outputs (1)

    NameTypeDescription
    clientLUMACLIENT