π MuAPI API Key
Paste Your MuAPI Key Once and Stop Re-typing It Into Every Node
- api_key
This node does nothing. It has one widget, one output, and no generation logic of any kind. It exists because every other node in the pack has its own api_key field, and you really don't want to paste the same 40-character string into nine of them - then find out three months later that one was a typo.
Think of it as a variable declaration for your credential. Paste the key into π MuAPI API Key, then wire its api_key output into the api_key input of every generation node in the graph.
What it actually does
The one input is api_key - a plain STRING, and the author's own tooltip says what you'd expect: "Your muapi.ai API key. Get one at muapi.ai β Dashboard β API Keys." The output is that same string, typed api_key.
Under the hood it calls the pack's shared key loader, which has a fallback chain:
- If you wired something into
api_key, use that. - If not, look for
~/.muapi/config.jsonand readapi_keyfrom it. - If neither exists, raise: "No API key found. Either paste your key into the api_key field, or run
muapi auth configure --api-key YOUR_KEY."
That third behaviour is the whole reason this node is pleasant. You can leave every api_key field in your workflow blank and let the pack pull the key from disk. Since MuAPI's CLI writes that file for you, one terminal command configures the entire pack:
muapi auth configure --api-key YOUR_KEY
Once that file exists, wiring this node is optional - and there's a real reason to skip it. Whatever you type into a node widget is saved into the workflow JSON. Share that workflow on Reddit or Civitai and you've shared your API key. A hub node doesn't fix this (its value is in the JSON too); only the config-file route keeps the key out of the file you hand around.
Wiring it
Any node in the pack takes api_key as an optional input, so ComfyUI won't stop you from running with it empty. Cleanest pattern: one API Key node near the top-left of the canvas, a fan of links out to everything else. If a node fails with a 401, the pack prints "Auth failed - check API key." - check the hub first, then that node's own field, because a value typed directly into the node overrides whatever you wired in.
Install
It ships with the rest of the pack, so there's nothing separate to install. ComfyUI Manager β Install via Git URL β https://github.com/SamurAIGPT/muapi-comfyui, then restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SamurAIGPT/muapi-comfyui
pip install -r muapi-comfyui/requirements.txt
The obvious-sounding traps
The key lives in a workflow file, so treat any workflow you download from someone else as possibly containing their credential - and don't be the person who uploads theirs. If the node errors with "No API key found", it's not an auth failure at all; it's the loader saying it found nothing in either place, which usually means the hub node is muted or the widget is an accidental space. And if you're coming from ComfyUI's official Partner Nodes: those authenticate through your Comfy account, while this pack holds a raw key in a node field, which is exactly the tradeoff the KB flags in external-api-nodes.md for third-party API packs. Check the author, keep the key in ~/.muapi/config.json where you can rotate it, and you're fine.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | Your muapi.ai API key. Get one at muapi.ai β Dashboard β API Keys |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| api_key | STRING | β |