☁️API LLM general link
The node most people start with
- model
- images
- extra_parameters
- assistant_response
- history
- tool
- image
- reasoning_content
If you only ever install one node from comfyui_LLM_party, this is probably it - it's the pack's own first "start_with_LLM_api" example workflow, and it's the node that shows up when someone on r/comfyui asks how to hook an OpenAI-format API into a ComfyUI graph. Pair it with the API LLM Loader node (which handles the base_url/api_key/model_name combo) and you've got a chat node that works with OpenAI, any relay/one-api-compatible endpoint, or literally anything that speaks the OpenAI chat-completions format - which, these days, is most of them.
The essentials are system_prompt, user_prompt, and model (the loaded model object from API LLM Loader) going in, assistant_response coming out - same shape as any chat API call. temperature controls randomness the usual way, and max_length (default 1920, noticeably higher than the local node's 512 default) caps response length. Two fields deserve a closer look because they solve real, specific problems: is_tools_in_sys_prompt exists for models that don't support native function calling - instead of relying on the API's tool-calling protocol, it stuffs the tool descriptions straight into the system prompt and hopes the model plays along, which is a real workaround people use for cheaper or older models that would otherwise be useless for agentic workflows. And stream flips on streaming output, which shows the response building token-by-token in the console rather than making you wait for the whole thing - genuinely useful for debugging a slow or hanging call, since you can tell immediately whether the API is responding at all versus just being slow.
Same main_brain / tool output pattern as the local node applies here too: disable main_brain and this node stops being your primary agent and becomes a tool another LLM node can call, which is how the pack builds its multi-agent chains. For vision-capable API models, images accepts image input directly, img_URL lets you pass a hosted image URL instead of raw data, and imgbb_api_key is there so images get uploaded to imgbb and passed as a URL rather than a giant base64 blob if you don't fill it in - a nice detail if you're worried about payload size on a long conversation. Newer reasoning models (the R1-style kind) get their own reasoning_content output, separate from assistant_response, so you can inspect or discard the model's scratch-work without it polluting the actual answer.
Installing it is the standard pack install: search "comfyui_LLM_party" in ComfyUI Manager, or git clone https://github.com/heshengtao/comfyui_LLM_party into custom_nodes and restart, then pip install -r requirements.txt from the pack folder using ComfyUI's own Python (portable builds: python_embeded\python.exe -m pip install -r requirements.txt, explicitly - the system pip is the wrong one).
The two mistakes people actually make here. First, base_url needs to end in /v1/ for OpenAI-format endpoints - leave off the trailing slash or point it at the wrong path and you'll get connection errors that look worse than the fix actually is. Second, decide where your API key lives and stick with it: you can configure openai_api_key/base_url once in the pack's config.ini and just type a model name on the node, or fill api_key/base_url directly on the API LLM Loader - mixing the two approaches (config set, node fields also blank, or vice versa) is the most common reason people report "nothing happens" with no visible error. If you're pointing this at Ollama instead of a cloud API, don't use this path at all - flip is_ollama on the loader node, which skips the base_url/api_key requirement entirely.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| system_prompt | STRING | 你一个强大的人工智能助手。 | System prompt, used to describe the behavior of the model and the expected output format. |
| user_prompt | STRING | 你好 | User prompt, used to describe the user's request and the expected output format. |
| model | CUSTOM | The model to use for the LLM. | |
| temperature | FLOAT | 0.70–1 | The temperature parameter controls the randomness of the model's output. A higher temperature will result in more random and diverse responses, while a lower temperature will result in more focused and deterministic responses. |
| is_memory | COMBO | enable | Whether to enable memory for the LLM. |
| is_tools_in_sys_prompt | COMBO | disable | Integrate the tool list into the system prompt, thereby granting some models temporary capability to invoke tools. |
| is_locked | COMBO | disable | Whether to directly output the result from the last output. |
| main_brain | COMBO | enable | If this option is disabled, the LLM will become a tool that can be invoked by other LLMs. |
| max_length | INT | 1920256–128000 | The maximum length of the output text. |
| system_prompt_inputopt | STRING | System prompt input, used to describe the system's request and the expected output format. | |
| user_prompt_inputopt | STRING | User prompt input, used to describe the user's request and the expected output format. | |
| toolsopt | STRING | Tool list, used to describe the tools that the model can invoke. | |
| file_contentopt | STRING | Input the contents of the file here. | |
| imagesopt | IMAGE | Upload images here. | |
| imgbb_api_keyopt | STRING | Optional, if not filled out, it will be passed to the LLM in the form of a base64 encoded string. API key for ImgBB, used to upload images to ImgBB and get the image URL. | |
| conversation_roundsopt | INT | 1001–10000 | The maximum number of dialogue turns that the LLM can see in the history records, where one question and one answer constitute one turn. |
| historical_recordopt | COMBO | The dialogue history file is optional; if not selected and left empty, a new dialogue history file will be automatically created. | |
| is_enableopt | BOOLEAN | true | Whether to enable the LLM. |
| extra_parametersopt | DICT | Extra parameters for the LLM. | |
| user_historyopt | STRING | User history, you can directly input a JSON string containing multiple rounds of dialogue here. | |
| img_URLopt | STRING | The URL of the image. | |
| streamopt | BOOLEAN | false | Whether to enable streaming output. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| assistant_response | STRING | The assistant's response to the user's request. |
| history | STRING | The dialogue history |
| tool | STRING | This interface will connect this LLM as a tool to other LLMs. |
| image | IMAGE | Images generated or fetched by the LLM. |
| reasoning_content | STRING | The assistant's reasoning process. |