AI Chat API
An LLM in your graph that calls DeepSeek, Qwen, or Doubao — key required
- images
- STRING
Don't let the name fool you: "AI Chat API" isn't a generic connector, it's a node with three specific providers baked in - DeepSeek, Qwen, and Doubao - and it will not work without an API key. What it does: drops a chat-LLM call into the middle of your graph, takes your prompt, and hands back the model's reply as a plain STRING that the rest of your workflow can chew on. That's the whole job, and it's the only node in the wwdm-aicd pack that touches the network; everything else is local text plumbing.
The mechanism is an OpenAI-compatible chat/completions POST under the hood. Pick provider (deepseek, qwen, or doubao), paste your api_key, and it hits a preset endpoint - api.deepseek.com, DashScope's compatible-mode endpoint for Qwen, or ByteDance's Ark endpoint for Doubao. Leave model blank and it uses the default per provider (deepseek-chat, qwen-plus, doubao-pro-32k); fill it in to use something else on the same endpoint. system_prompt and user_prompt do what you'd expect, max_tokens caps the reply (64 to 65536, default 2048), and temperature runs 0 to 2. The interesting extra is the optional images input: it takes an IMAGE tensor, converts each image to a base64 JPEG, and sends it as image content alongside the text - so it's actually a vision node in disguise. Send a frame, ask "describe this scene as a prompt," get the description back.
Why reach for it: the same reason people build DeepSeek prompt-expansion nodes and actually use them - DeepSeek is cheap, and prompt-enhancement is exactly the job a small cloud call is good at (it's the API path from the KB's LLM-in-the-graph playbook: write the structured prompt, feed it to your encoder). The README's demo pipeline is telling: AIChatAPI output → TextFilterLines → TextSplit → JsonParser, i.e. the LLM is upstream of the plumbing. If you're not in a region that can easily pay those three providers, this node is useless to you - there's no OpenAI/Anthropic/OpenRouter option and no way to point base_url elsewhere.
Where people get burned, in order: forgetting the key (it raises api_key is required - fair), then the honest one that applies to every API-wrapper node: your prompt, your key, and any image you feed it leave your machine and go to a server you don't control. That's the security frame the community learned the hard way - the LLMVISION malware incident made "custom node that phones home with your key" the exact shape of the thing that got weaponized. This node is small, open, and does nothing but the three documented endpoints, so read it once and decide; the risk is the category, not this specific code. Also note it's synchronous with a 120-second timeout - a slow model call blocks the graph, and a non-200 response surfaces as a raw error with the API's body text.
Install is the same for the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/wwsmiao/comfyui-wwdm-aicd.git
Restart ComfyUI, find it under wwdm-aicd. Despite the README, don't bother with pip install -r requirements.txt - there's no requirements.txt in the repo; it uses requests, which ComfyUI already ships. The author's README and source comments are in Chinese, and the pack is brand new with effectively zero installs, so treat it as "works, but nobody's vetted it in the wild." One caveat from the README's history: the author's git log shows an earlier local Qwen inference node was removed in favor of this pure-API approach - so this is the maintained path, for what that's worth. If you need the uncensored, offline option, the KB's own conclusion is that a local 8B model beats an API for exactly the content an API will refuse.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| provider | COMBO | deepseek | 3 options: deepseek, qwen, doubao |
| api_key | STRING | — | |
| model | STRING | — | |
| system_prompt | STRING | — | |
| user_prompt | STRING | — | |
| max_tokens | INT | 204864–65536 | — |
| temperature | FLOAT | 0.70–2 | — |
| imagesopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |