Nodes/ComfyUI-nkxx/🔑 API Key 管理器
ComfyUI Node

🔑 API Key 管理器

The one node that saves you from pasting keys into every Grsai node

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
🔑 API Key 管理器
      active_count1
      name1
      api_key1
      name2
      api_key2
      name3
      api_key3
      name4
      api_key4
      name5
      api_key5
      name6
      api_key6
      name7
      api_key7
      name8
      api_key8
      name9
      api_key9
      name10
      api_key10

      This is the "please don't make me paste my key into 14 nodes" answer. Every other node in the ComfyUI-nkxx pack - the Nano Banana ones, the Grok video ones, the Midjourney clones - reads its API key from a node field first, then falls back to an environment variable or the pack's config. The ApiKeyManager exists to make that first step painless: you store up to ten named keys in one pretty panel, and they're available wherever the pack needs them. If you've got one Grsai key and one Wujiai key, this is genuinely all you need to run the whole pack.

      The name is slightly misleading, by the way. It doesn't call any API and it holds no secrets of its own - it's a frontend-only widget node that shoves what you type into hidden widget slots on itself. The runtime magic lives in the pack's get_api_key() helper, which checks, in order: the key typed directly into a node, then the GRSAI_KEY / WUJIAI_KEY environment variables, then whatever's hardcoded in __init__.py. So the manager is a convenience, not a vault. Don't treat it as secure storage - treat it as a nicer clipboard.

      The inputs that matter

      The only visible widget is active_count (an INT, 1–10), which controls how many key/name rows show up. Beneath it live ten pairs of hidden nameN / api_keyN string fields - when you type a label and key into the panel, they land in those slots. That's the whole schema, and that's the whole node.

      The practical usage: give each key a name you'll recognize (e.g. "grsai main", "wujiai backup"), paste the key beside it, and crank active_count to however many you actually have. Save the workflow and your keys travel with it - which is exactly why you should think twice before sharing workflow files that contain this node.

      Install & first run

      Install is the pack's install. ComfyUI Manager: search "ComfyUI-nkxx". Or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/jieg9341-lab/ComfyUI-nkxx
      

      Then restart ComfyUI. First launch auto-installs requests, pandas, openpyxl, yt-dlp, opencv-python, and aiohttp if they're missing - if that silently fails you'll see import errors and should pip install them manually. There are no model downloads and no heavy dependencies; this pack doesn't run a single model locally, it phones home to the Grsai/Wujiai reseller APIs.

      Common issues

      • Keys not applying: the node is pure UI, so if you paste a key here and a downstream node still says "未配置 Grsai API Key" (API key not configured), you almost certainly have it typed in the wrong channel's node, or the workflow was saved before you hit anything. Keys are read at execution time, not stored globally.
      • The panel looks empty after loading a workflow: the DOM widget re-renders on load; give it a beat. It's the classic frontend-widget quirk, and the pack has shipped several fixes for exactly this.
      • Security posture: this is an API-wrapper pack from a single author, and the Wujiai-side node files ship as obfuscated (base64+zlib) blobs - you literally cannot read what they do from source. That's a real trust decision to make, not something to shrug past; the KB's history with credential-carrying node packs is why the "read before you run" advice exists. If you're cautious, keep keys out of shared workflows and use environment variables instead.
      CategoryNkxx/Tools

      Inputs (21)

      NameTypeDefaultDescription
      active_countINT11–10
      name1optSTRING
      api_key1optSTRING
      name2optSTRING
      api_key2optSTRING
      name3optSTRING
      api_key3optSTRING
      name4optSTRING
      api_key4optSTRING
      name5optSTRING
      api_key5optSTRING
      name6optSTRING
      api_key6optSTRING
      name7optSTRING
      api_key7optSTRING
      name8optSTRING
      api_key8optSTRING
      name9optSTRING
      api_key9optSTRING
      name10optSTRING
      api_key10optSTRING

      Outputs (0)

      No outputs