Nodes/comfyUI-tool-2lab/ChatGLM chatGPT 智谱AI (Factx API)
ComfyUI Node

ChatGLM chatGPT 智谱AI (Factx API)

ChatGLM from Zhipu AI, reached through the Factx API marketplace

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
ChatGLM chatGPT 智谱AI (Factx API)
  • api_id
  • api_key
  • text
prompt

FactxChatGlmGPT (2lab) is a prompt-to-text LLM node for ChatGLM - the model family from Zhipu AI (智谱AI), the Tsinghua University spin-off that's since rebranded internationally as Z.ai. And it reaches that model through "Factx API," a third-party API marketplace rather than calling Zhipu directly. In plain terms: this is the pack's Chinese-ecosystem answer to the Openai_chatGPT node, for people whose API access runs through Factx instead of through a Western provider.

The wiring pattern is identical to the pack's other LLM nodes: text in, generated text out, into your graph wherever you need a string - prompt drafting, rewriting, translation, tag generation. The difference is the credential model. Where the OpenAI node takes a single secret_key, the Factx nodes take a pair: an api_id and an api_key, which is the standard shape of an account on a Chinese API aggregator (one ID for the account, one key for auth, both tied to the marketplace's billing).

How it works

Required inputs:

  • api_id - your Factx account ID (a KEY-typed field, so it's masked on the graph).
  • api_key - your Factx API key, also masked.
  • prompt - the message, multiline. This is where you ask the model to do whatever you need.

The text output is the model's reply, ready to feed a CLIP Text Encode or another node.

Two honest realities to set expectations. First, this node is part of a China-facing API setup: Factx appears to be an API marketplace for Chinese LLM services, and there's essentially zero English-language community discussion of it - my search of the usual reddit/forum corpus turns up nothing. If you're outside that ecosystem, the hard part isn't the node, it's getting api_id/api_key credentials in the first place. Second, the pack is undocumented (the README is one word long), so the exact model behind "ChatGLM" here - which GLM generation, which endpoint - is whatever Factx routes to. The author picked this for the audience he was serving; if you're not that audience, the plain OpenAI node is usually the easier road.

The reassuring side: it's a pure API call. No local model weights, no VRAM, no download - just a key pair and network access. If you already hold Factx credentials, this is a one-node way to put a capable Chinese LLM in the prompt loop of a ComfyUI workflow.

Installing it

From AI2lab/comfyUI-tool-2lab. ComfyUI Manager → search comfyUI-tool-2lab → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab

Restart ComfyUI after. No model downloads, no dependencies beyond the API keys. One habit worth keeping regardless of which LLM node you use: never bake a live key into a shared workflow - ComfyUI embeds workflow JSON into output images, and a key sitting in a widget can travel farther than you think.

Category🦊2lab/factxApi/llm

Inputs (3)

NameTypeDefaultDescription
api_idKEY
api_keyKEY
promptSTRING

Outputs (1)

NameTypeDescription
textSTRING