API LLM Loader
The node that holds your API key so the rest of the pack can talk to an LLM
- client_info
The name is a little misleading. "API LLM Loader" doesn't load anything into VRAM - no weights, no download, no 20 GB of GGUF files. It builds a client: a small object that knows which API to hit, with what key and model, and hands that to the rest of the pack. Every other node in ComfyUI-PDiD-LLM-Nodes - API Chat, Captioner, Generate BBOXes - expects a client_info input, and this is the only node that produces one. So it's always your first node in the graph, and the one that decides whether you're paying OpenAI, talking to a local Ollama, or something in between.
How it works
You fill in three fields and pick a client type, and the loader calls one of five SDKs under the hood: OpenAI's Chat Completions API (openai), the newer Responses API (openai-responses, which OpenAI now recommends), ollama for a local server, mistralai, or anthropic. It packages that into a CLIENT_INFO object and passes it along. The actual network call doesn't happen here - that fires downstream when a chat or caption node runs. Think of client_info as a cable you plug from the loader into the node that does the work.
The inputs that matter:
- base_url - defaults to
https://api.openai.com/v1. This is also how you point it at a proxy or an OpenAI-compatible service (ModelScope, vLLM, whatever). - api_key - the default
sk-1234567890is a placeholder, not a real key. Swap it or every request 401s. - model_name - default
gpt-5-high. For Ollama, this is where you type your local model name likeqwen2.5vl:7borllama3.2-vision. - client_type - the combo dropdown. If you pick
ollama,base_urlandapi_keyare ignored entirely; it just talks tohttp://localhost:11434.
The one output, client_info, feeds the client_info input on ChatViaAPI, CaptionViaAPI and GenerateBBOXViaAPI.
Why you'd bother with an API pack at all
Because your GPU is already busy. The whole pitch of this pack is that the LLM lives outside ComfyUI - you pay per call or run it in Ollama, and the diffusion model keeps all the VRAM. The README's stated reason for existing is dependency hell: the author found that other LLM node packs pull in a pile of libraries where one missing dependency bricks the lot, and some depend on aisuite which fought his local environment. This pack is deliberately lean - each node imports only what it needs.
That's also the honest flip side: you're trusting a small pack with your API key. The community has a well-earned scar here - the ComfyUI_LLMVISION incident of 2024 (a malicious "LLM vision" node that exfiltrated keys, ending in a federal plea) is still the standard cautionary tale. Keep keys out of workflows you share; a workflow JSON carries whatever you typed into it.
Install
It's a normal custom node. Easiest route is ComfyUI Manager - search ComfyUI-PDiD-LLM-Nodes and install. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/power88/ComfyUI-PDiD-LLM-Nodes
then restart ComfyUI. One requirement the README is blunt about: ComfyUI 0.3.51 or newer - this pack uses the new V3 node schema, so older installs won't see it. Dependencies (openai, ollama, anthropic, mistralai, jinja2, pydantic, etc.) install automatically via Manager or the requirements file. No model downloads, ever.
Troubleshooting
- 401 / auth errors - check the key, and remember the default is a fake one.
- "The client type is not supported" - you picked a client type the pack knows about but something downstream choked; make sure the SDK for that type is installed.
- Anthropic is officially untested. The author can't reach Anthropic from his region and says so in the README - it reportedly works via ModelScope, but if Claude is your target, expect to be the test case.
- For Ollama, make sure the server is running and the model name you typed into
model_nameactually exists (ollama list).
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| base_url | STRING | https://api.openai.com/v1 | The API URL of the provider. |
| api_key | STRING | sk-1234567890 | The API key of the provider. |
| model_name | STRING | gpt-5-high | The name of the model. |
| client_typeopt | COMBO | openai | The type of the LLM client (OpenAI chat comptitable? or Mistral?). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| client_info | CLIENT_INFO | — |