🔑 MuAPI API Key:
MuAPIApiKey provides a reusable way to supply a MuAPI API key to your workflow. It returns the key you enter or, when you leave the entry blank, reads a key from your local MuAPI configuration file. This can save you from pasting the same key into multiple places. The node does not generate a key, check whether it is valid, or make an API request; it prepares a key for other nodes to use.
🔑 MuAPI API Key Input Parameters:
api_key
A required, single-line text field for your MuAPI API key. Its default is an empty string. Entering a key makes the node return that key, with any spaces at the beginning or end removed. If you leave the field empty or enter only spaces, the node instead looks for an api_key value in ~/.muapi/config.json. No minimum or maximum length, fixed options, or accepted key format are specified in the node source. Although the field itself is required, you can leave its value blank when you have configured a key in the local file.
🔑 MuAPI API Key Output Parameters:
api_key
A text value containing the key selected by the node: either the nonblank key you entered, with surrounding spaces removed, or the api_key value read from the local configuration file. Connect this output to a downstream node that accepts an API key. The output is not a confirmation that the key is valid or that MuAPI has accepted it. If neither source provides a key, the node raises an error instead of returning this output.
🔑 MuAPI API Key Usage Tips:
- Enter your key in
api_keywhen you want this workflow to use a specific key. A nonblank entry takes priority over the local configuration file. - Leave
api_keyblank to use the key stored in~/.muapi/config.json. The node’s error message suggests configuring one withmuapi auth configure --api-key YOUR_KEY. - Connect the
api_keyoutput to each downstream key field you want to populate. The provided implementation does not establish that other nodes automatically read a key from this node without a connection. - Handle the key as a secret. Avoid sharing workflow exports or screenshots that expose a key pasted into the field.
🔑 MuAPI API Key Common Errors and Solutions:
No API key found. Either paste your key into the api_key field, or run muapi auth configure --api-key YOUR_KEY in a terminal.
- Explanation: The field is empty or contains only spaces, and the node could not obtain a usable key from
~/.muapi/config.json. The file may be missing, itsapi_keyvalue may be empty, or the file may be unreadable or invalid JSON. The node handles file-reading and JSON errors internally, so this is the error you may see instead. - Solution: Paste your key into
api_key, or configure the local key using the command shown in the error message. If you expect the file to work, check that it exists in the environment running the node, can be read, contains valid JSON, and has a nonemptyapi_keyvalue.
A downstream node reports an invalid or unauthorized API key
- Explanation: MuAPIApiKey returns the selected text without checking it against MuAPI. A downstream service can therefore reject a key even though this node produced an output.
- Solution: Check that you entered the intended key or configured the intended key in the local file. If both are present, remember that the nonblank field takes priority. Confirm the key’s status through your MuAPI account and update the incorrect value.
