LLM API Call
A no-VRAM LLM in your graph, one HTTP request at a time
- response
- full_json
Here's the thing that makes this node worth knowing about: it puts a working LLM in your ComfyUI graph and costs you exactly zero VRAM, zero model downloads, and zero local installs. The name is honest - this is an API call node, not a model loader. It takes a prompt, fires it at an OpenAI-compatible chat endpoint, and hands the reply back as a string you can wire anywhere. If you've ever wanted a quick "have a chatbot rewrite this prompt" step without pulling in a heavy multi-provider pack, this is the minimal thing that does it.
The honest framing up front: this is a tiny, brand-new pack from a nearly unknown author, and it shows in the right ways - one node, one dependency, MIT license, readable in a minute. It's the kind of node you'd write yourself on a slow afternoon, which is exactly its appeal and its ceiling.
What it actually does
Mechanically it's a requests.post() to whatever api_url you give it, with an OpenAI-format body: your model, a system and user message, temperature, and max_tokens. The api_token goes in as a Bearer header. Whatever comes back, it parses choices[0].message.content into the response output and dumps the entire raw reply into full_json so you can see what the API actually said. Timeout is 60 seconds, no streaming, no retries.
One gotcha hides in the defaults. The README still describes an OpenAI setup with gpt-3.5-turbo - but the README is stale. The shipped code defaults to DeepSeek (https://api.deepseek.com/v1/chat/completions, model deepseek-chat). Trust the code. And note it wants the full endpoint URL, /v1/chat/completions included - this is not a base-URL field, which trips up people who paste in https://api.openai.com/v1 and get a 404.
The inputs that matter
- api_url - the full chat endpoint. Works with OpenAI, Azure, DeepSeek, and any local OpenAI-compatible server (vLLM, text-generation-webui) per the README.
- api_token - your key. Local servers often accept any dummy value; some want it empty.
- model - the model name the server actually serves (
deepseek-chat,gpt-4o, a vLLM-served local model). - prompt / system_prompt - the user and system messages. The rest (
temperature,max_tokens) are what you'd expect.
Outputs are response (the text) and full_json (the raw JSON). Wire response into anything that takes a string - most usefully a CLIP Text Encode's text input.
Where it bites
First: this node does zero output cleaning. A chat model returns chat - "Here is your enhanced prompt:" preamble, markdown, refusal boilerplate - and if you feed that straight into CLIP Text Encode, the scaffolding bleeds into your conditioning. If the reply looks polluted, add a second LLM step or strip it yourself.
Second: your key lives in a widget, which means it lives in the workflow JSON, which gets embedded into every saved image's metadata. Share a workflow PNG and you've shared your DeepSeek token. Don't paste a real key into a workflow you'll export.
Third: errors don't crash - the node catches them and returns "API Request Error: …" as the response text. Your graph looks like it ran fine. Watch the output.
Install
cd ComfyUI/custom_nodes/
git clone https://github.com/10e9928a/ComfyUI-LLM.git
Then restart ComfyUI and look under ComfyUI-LLM → LLM API Call (or just search the node list for "LLM API Call"). ComfyUI Manager can do the same - search "ComfyUI-LLM". The only dependency is requests, which ComfyUI's environment almost certainly already has, so no heavy installs.
The honest verdict
It's a teaching-grade utility, not a production prompt-enhancer. For a quick API call in a workflow it's the smallest thing that works. Before you trust it with a real key, skim the ~60 lines of nodes.py - it's short enough to read in a minute, and this category of node (remote call, holds a credential) is exactly the one the ecosystem has been burned by. It does one job and does it plainly; for anything fancier, you'll outgrow it fast.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| api_url | STRING | https://api.deepseek.com/v1/chat/completions | — |
| api_token | STRING | — | |
| prompt | STRING | Hello, how are you? | — |
| model | STRING | deepseek-chat | — |
| temperature | FLOAT | 0.70–2 | — |
| max_tokens | INT | 10001–32000 | — |
| system_promptopt | STRING | You are a helpful assistant. | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |
| full_json | STRING | — |