DeepSeek API Assistant (PixNodes)
A real LLM in your graph, cheap
- text_response
- history
An LLM inside your ComfyUI graph is the difference between "I have to write this prompt myself" and "I describe the image and a model writes the prompt for me." Pix_DeepSeekApiNode is the PixNodes way to bolt one on: it calls the DeepSeek API - the Chinese model that became famous for near-frontier quality at remarkably low prices - and hands you the text back as a STRING ready to feed your encoder. It's the LLM node of this pack that English-speaking users are most likely to recognize, because DeepSeek's API is cheap enough that it's a credible default.
Inputs worth knowing: api_key (persisted to api_key.json after the first run - leave blank after that), base_url (default https://api.deepseek.com, and the fact it's editable means you can point it at compatible proxies), model (deepseek-chat for general work, deepseek-reasoner for the thinking variant), prompt, system_instruction, seed (for reproducible outputs), and the three "auto" fields - max_tokens, temperature, and optional top_p. The "auto" convention is a nice touch: leave them as auto and the model picks sensible defaults; type a number and it's used. Optional inputs include history (feed back the history output for multi-turn) and input_file_text (long external text appended as context - how you analyze a whole document without pasting it into the prompt widget).
Outputs: text_response (the answer) and history (the full message list as JSON). The loop-back pattern - history out → history in - is how you get multi-turn conversation through the node; the pack's own docs show it as a first-class feature.
A couple of implementation facts shape the failure modes. The node uses the official openai Python client against DeepSeek's OpenAI-compatible endpoint, and it deliberately doesn't send temperature/top_p for deepseek-reasoner - reasoning models reject or ignore those params, so the node silently skips them. If you set a temperature and the reasoning model ignores it, that's correct behavior, not a bug. It also hashes its inputs (IS_CHANGED) so the node always re-runs when anything changes - which is what you want for an LLM call, but it means every queue pass costs a request, so don't leave it in a workflow you batch 500 times.
Errors come back as strings prefixed Error: rather than exceptions - "Error: API Key invalid." on auth failure is a literal output, not a crash, so check the text you get back when things look wrong.
Install is the standard PixNodes path - ComfyUI Manager, search PixNodes, restart - or:
cd ComfyUI/custom_nodes
git clone https://github.com/pixixai/Comfyui-PixNodes
cd Comfyui-PixNodes
pip install -r requirements.txt
then restart. This is the node the openai dependency in requirements.txt is for, so if installs are broken, that's the first thing to check.
Security hygiene, briefly: this is an API node carrying a credential - the exact shape the KB's LLM essay warns about (the ComfyUI_LLMVISION incident is the cautionary tale). It writes your key to a JSON file in the user dir and sends your prompts to a cloud API. That's the deal with any API assistant; just don't install random forks, and know your prompts leave your machine.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | https://api.deepseek.com | — |
| model | COMBO | deepseek-chat | 2 options: deepseek-chat, deepseek-reasoner |
| prompt | STRING | — | |
| system_instruction | STRING | You are a helpful assistant. | — |
| seed | INT | 00–18446744073709550000 | — |
| max_tokens | STRING | auto | — |
| temperature | STRING | auto | — |
| top_popt | STRING | auto | — |
| historyopt | STRING | — | |
| input_file_textopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text_response | STRING | — |
| history | STRING | — |