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

ElevenLabs Pro - API Key

One key node to feed them all — and it won't leak into your PNGs

By IxMxAMAR·Created 5 months ago·Updated about a month ago· 1
ElevenLabs Pro - API Key
    • api_key
    api_key

    Every paid node in this pack needs your ElevenLabs API key, and pasting the same secret into ten different nodes is how keys end up in the wrong place. This node exists to hold the key once and pass it around, with a security story that actually holds up. It's the pack's config hub, and once you've set it up you can stop thinking about authentication entirely.

    The mechanism is the interesting part. The node takes your key as a password=True string, which masks it in the UI so it doesn't stare back at you from your monitor. It then passes that key out as a plain STRING for you to wire into TTS, STS, Dialogue, Music, and the rest. Two things make it smarter than a dumb passthrough. First, it falls back to the ELEVENLABS_API_KEY environment variable when the field is blank, so you can keep the secret out of the workflow JSON altogether and the node just resolves it at runtime. Second, its IS_CHANGED method hashes the key with SHA-256 rather than returning the literal value - which matters because ComfyUI bakes IS_CHANGED results into workflow PNG metadata, and a literal key in a PNG you share on Civitai is a key in the wild. The hash means the node's "did this change?" answer is stable and leak-free.

    The one input is api_key, the one output is api_key. There's nothing else to fiddle with, which is the point.

    Now, the honest take: you don't strictly need this node. Every paid node in the pack has its own api_key input, and if you set ELEVENLABS_API_KEY in your environment, you can leave them all blank and everything just works. So why bother? Two reasons. If you're not comfortable with env vars, a single visible place to paste and see the key is friendlier than hunting through node properties. And if you build a workflow you plan to share, wiring everything through this one node and leaving it blank (relying on the env var) means the recipient's key never ends up in a file you distribute. That's the clean pattern: one key node in the corner of the graph, every paid node fed from it, and the value itself never serialized anywhere sensitive.

    Install is the pack standard:

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

    Restart ComfyUI, or install "ComfyUI-ElevenLabs-Pro" from ComfyUI Manager. Only requests and soundfile in requirements - there's no model to download, the whole pack is a thin API client.

    The gotchas worth knowing are upstream and pack-wide. This pack went through a v2.1 security audit specifically because a v2.0 ConnectionError could echo your key back through a stack trace, and there's now scrub_secrets() on every raised error so the key gets redacted before it hits ComfyUI's console or logs. That's defense in depth, not a free pass - the key is still a secret, still lives in your config, and still bills your account. One more practical note: because the node's output is a STRING, you can also treat it as a test for "is my key configured?" - leave the field empty, queue, and if you get the "No ElevenLabs API key provided" error, you know the env var isn't set where ComfyUI runs.

    CategoryElevenLabs Pro/Config

    Inputs (1)

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

    Outputs (1)

    NameTypeDescription
    api_keySTRING