Nodes/ComfyUI API Toolkit/ElevenLabs - API Key
ComfyUI Node

ElevenLabs - API Key

Put the secret in once, never again

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 1
ElevenLabs - API Key
    • api_key
    api_key

    Every other ElevenLabs node in this pack takes an api_key input. You could paste the same key into all fifteen of them, but then it lives in fifteen widget values, and a widget value is something you can accidentally bake into a shared workflow or a screenshot. This node exists so you type the key exactly once, wire its single api_key output into every node downstream, and forget about it.

    The name is a slight lie, in the best way. It makes no API call at all. It's a pass-through: give it a key, it hands it back as a STRING output, having first applied one fallback rule. Type nothing into the field and it reads the ELEVENLABS_API_KEY environment variable instead. If both are empty it raises a clear error telling you to go get a key - from elevenlabs.io, in case that wasn't obvious. The field is password: True in the source, so the UI masks it as dots rather than showing it in plaintext on the canvas. That's the whole trick, and honestly the whole point.

    Where people get burned: the fallback only works if you've actually exported the variable in the environment your ComfyUI server runs under. If you launch ComfyUI from a desktop shortcut or a systemd service that doesn't source your shell rc file, the env var is silently absent and the node errors. When that happens, either paste the key in, or make sure ELEVENLABS_API_KEY is set in whatever process actually boots ComfyUI.

    Installing it

    This is one node of the ComfyUI API Toolkit pack, which bundles ElevenLabs, Google Gemini, and Kling AI into one install. The easy route is ComfyUI Manager - search for "API Toolkit" and install. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
    cd ComfyUI-API-Toolkit
    pip install -r requirements.txt
    

    Restart ComfyUI. For the ElevenLabs side you need the requests and soundfile entries in that requirements file. The pack's design is that a missing dependency only disables the affected service - you'll see [!!] elevenlabs disabled -- missing dependency in the startup log and everything else still loads.

    The honest version

    ElevenLabs is a closed, credit-metered API - the community's standing quality bar for TTS, but you pay per character and your text leaves the machine. That's the cost of admission for every node in this pack, and this key node is where you accept it. Keep the key out of shared workflows, use the env var for anything automated, and you're done. The only thing this node outputs is api_key (STRING), and that's the only thing it's for.

    CategoryAPI Toolkit/ElevenLabs/Config

    Inputs (1)

    NameTypeDefaultDescription
    api_keySTRINGYour ElevenLabs API key. Also checks ELEVENLABS_API_KEY env var as fallback.

    Outputs (1)

    NameTypeDescription
    api_keySTRING