🔑 API Key Manager:
The APIKeyManager node is designed to facilitate the management of API keys within the ComfyUI environment. Its primary purpose is to securely handle API keys by storing them in a configuration file rather than embedding them directly in workflow files, ensuring enhanced security and privacy. This node allows you to perform various actions such as checking the status of an API key, setting a new key, configuring a pass path for secret management, and clearing existing keys. By providing a centralized and secure method for managing API keys, the APIKeyManager node helps streamline the process of integrating external services into your workflows, making it easier to maintain and update credentials without exposing sensitive information.
🔑 API Key Manager Input Parameters:
provider
The provider parameter specifies the service provider for which the API key is being managed. It is a required parameter and offers a list of available providers, such as "google", from which you can select. The default value is "google". This parameter determines which provider's API key will be checked, set, or cleared, and it is crucial for ensuring that the correct credentials are managed.
action
The action parameter defines the operation to be performed on the API key. It is a required parameter with options including "check", "set", "set_pass", and "clear". The default action is "check". This parameter dictates whether you are verifying the status of an API key, setting a new key, configuring a pass path, or removing an existing key, thus controlling the node's behavior.
api_key
The api_key parameter is an optional input used when setting a new API key for a provider. It accepts a string value, which should be the actual API key you wish to store. The default value is an empty string, and it is not saved in the workflow file. This parameter is essential when the action is set to "set", as it provides the key to be stored securely.
pass_path
The pass_path parameter is an optional input used when configuring a pass path for secret management via CLI. It accepts a string value representing the path to the pass entry. The default value is an empty string. This parameter is important when the action is set to "set_pass", as it specifies the location of the secret managed outside ComfyUI.
🔑 API Key Manager Output Parameters:
status
The status output parameter provides feedback on the result of the action performed. It returns a string that indicates the success or failure of the operation, such as "✓ google key saved locally" or "⚠No key provided". This output is crucial for understanding the outcome of the node's execution and for troubleshooting any issues that may arise during the management of API keys.
🔑 API Key Manager Usage Tips:
- Always ensure that the
providerparameter is correctly set to match the service you are working with, as this will prevent errors related to unknown providers. - Use the
checkaction regularly to verify the status of your API keys and ensure they are correctly configured and active.
🔑 API Key Manager Common Errors and Solutions:
âš No key provided
- Explanation: This error occurs when attempting to set an API key without providing a key value.
- Solution: Ensure that you input a valid API key in the
api_keyparameter before executing the node with the "set" action.
âš No pass path provided
- Explanation: This error arises when trying to set a pass path without specifying the path.
- Solution: Provide a valid pass path in the
pass_pathparameter when using the "set_pass" action to configure secret management.
Unknown action
- Explanation: This error indicates that an invalid action was specified in the
actionparameter. - Solution: Verify that the
actionparameter is set to one of the valid options: "check", "set", "set_pass", or "clear".
