Nodes/ComfyUI-ZMongo/00 API Key Session
ComfyUI Node

00 API Key Session

Every ZMongo workflow starts here — and it's not calling your database

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
00 API Key Session
    • session
    • json
    • status
    api_key

    00 API Key Session is the front door to the whole ComfyUI-ZMongo pack. Almost every other node in the pack - creating collections, saving images, calling Gemini - takes a session input that only this node produces. You wire one of these in, it validates against the backend, and the session output becomes the auth token that travels through your graph. No session, no ZMongo.

    The name is a hint that the pack's ambitions run in a particular direction. ZMongo isn't a local database node; it's a client for a hosted API plus a zero-config local file store, and this node is the hosted-API flavor. It's the "API Key" variant precisely because it trades a key for a session instead of setting up a local store.

    How it works

    The node takes exactly one required input, api_key - the API key from your ZMongo/BusinessProcessApplications account. Behind the scenes it builds an authenticated session object pointed at https://businessprocessapplications.com and immediately calls the backend's whoami() endpoint to verify the key is live. The tooltip on the input spells it out: "Your ZMongo API key."

    Its three outputs:

    • session (ZMONGO_API_SESSION) - the connection object every downstream node needs. This is the one you actually wire places.
    • json - the raw whoami() response as pretty JSON. Handy for eyeballing your account/silo info, not much else.
    • status - a one-line human-readable result: API session created successfully. on a good key, or an error string when auth fails.

    Two details worth knowing. First, the node is marked DISPLAY_ONLY and runs every time the graph executes (the pack uses an "always dirty" mixin), so a session is always fresh when it flows downstream. Second, it doesn't gracefully degrade to local mode on its own - the README's "dual operational backend" setup uses a separate Local File Store Session node when you don't have a hosted key. So if you want zero-config, on-disk persistence without an account, grab that node instead; this one always wants a real key.

    Install

    Via ComfyUI Manager, search ComfyUI-ZMongo and install. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
    

    then restart ComfyUI. Heads up: the README's pip install pymupdf python-docx requests python-dotenv is the lite version. The actual requirements.txt pulls in far more - pymongo, langchain, sentence-transformers, FlagEmbedding, pymilvus, tkhtmlview, and friends. Manager will install all of it, and the first import can take a while. For this node specifically, only requests matters; the rest is the pack's document/vector machinery that you can safely ignore.

    Gotchas

    • The key lives in your workflow JSON in plain text. Workflows get shared as image metadata in this ecosystem; a leaked key is a real key, so don't post workflows with it filled in. The example workflows ship with the key field deliberately cleared.
    • This is a custom node that dials home to a third-party server on every run - worth knowing given the ecosystem's history with malicious nodes. Vet the pack you're cloning; this one is Apache-2.0 and open source, so read it if you're cautious.
    • If you see API session failed: ... in status, the JSON output holds the reason. Nine times out of ten it's a stale or revoked key.
    CategoryZMongo/00 Auth

    Inputs (1)

    NameTypeDefaultDescription
    api_keySTRING

    Outputs (3)

    NameTypeDescription
    sessionZMONGO_API_SESSION
    jsonSTRING
    statusSTRING