Nodes/ComfyUI-ListHelper/OpenRouter LLM
ComfyUI Node

OpenRouter LLM

Run 70B-class LLMs inside ComfyUI without owning a GPU

By dseditor·Created about a year ago·Updated 7 months ago· 75
OpenRouter LLM
  • image_input_1
  • image_input_2
  • image_input_3
  • image_output
  • text_output
api_key
user_promptPlease analyze the provided content.
text_modelgoogle/gemma-3-27b-it:free
prompt_templateCustom
seed-1
custom_model
system_prompt
enable_resizefalse
target_width1024
target_height1024
resize_methodlanczos

OpenRouter LLM is the node you reach for when you want a genuinely smart LLM - think Llama 4 Maverick, Qwen2.5-VL 72B, Kimi K2 - writing prompts or describing images in your workflow, but you don't want to give up 8GB of VRAM (or any of it) to a local model. It calls the OpenRouter API from inside the graph, so the heavy lifting happens on their servers. The catch is the obvious one: it needs an API key and an internet connection, and the free-tier models are rate-limited. If that trade sounds fine, this is the smoothest way to get there.

How it works

The node posts your prompt (and any attached images) to OpenRouter's https://openrouter.ai/api/v1/chat/completions endpoint with a bearer token. That's the whole mechanism - no local model, no llama.cpp, no VRAM. Images you connect get base64-encoded into the request, which is why this handles vision models like the Qwen2.5-VL entries in the dropdown without you doing anything special. For the handful of image-generation models in there (the Gemini image-preview ones), the node sets an image output mode and returns the picture as image_output; for normal text models it just returns text_output. The node even remembers your key in a local config.json, so you paste it once and leave the field blank afterwards.

The inputs that matter

  • api_key - from openrouter.ai/keys. Free account is fine; most models in the dropdown are :free variants.
  • text_model - dropdown of ~10 mostly-free OpenRouter models, plus an "Add Custom Model..." option where you type into custom_model. Default is google/gemma-3-27b-it:free, which is a solid prompt-optimizer.
  • user_prompt - your actual request. Multiline.
  • prompt_template - pick a .md template from the pack's Prompt folder (photography, image-to-prompt, person-feature extraction, video-frame transitions…) or leave "Custom" and write your own system_prompt.
  • image_input_1/2/3 - optional images for vision models.
  • enable_resize with target_width/target_height/resize_method - pads or scales images to a fixed size before upload. Only active when enable_resize is on; the author's own tooltips say so. Leave it off unless a model rejects odd-sized images.

seed exists, but read its tooltip before trusting it: some models honor it, and image-generation models like Gemini simply don't support a seed parameter. Set it for reproducible text, don't expect it to work everywhere.

Installing it

This pack ships with a bunch of unrelated nodes, so you get OpenRouter LLM as a bonus:

cd ComfyUI/custom_nodes
git clone https://github.com/dseditor/ComfyUI-ListHelper
# restart ComfyUI

Or use ComfyUI Manager: Install Custom Nodes → search "ComfyUI-ListHelper". Base dependencies (regex, accelerate, reportlab) install with the pack; the node uses requests, which ComfyUI already ships.

Where people get burned

The 429. Free OpenRouter models rate-limit hard, and the node surfaces it as a message in the output. If you're batch-processing hundreds of frames through a :free model, you will hit it - either pay for a cheap model or throttle your loop. Also remember this is cloud inference: your images leave your machine. If you're working on private client work, that matters more than the model choice.

CategoryListHelper/LLM

Inputs (14)

NameTypeDefaultDescription
api_keySTRING
user_promptSTRINGPlease analyze the provided content.
text_modelCOMBOgoogle/gemma-3-27b-it:free11 options: google/gemma-3-27b-it:free, qwen/qwen2.5-vl-32b-instruct:free, mistralai/mistral-small-3.2-24b-instruct:free, meta-llama/llama-4-maverick:free, openai/gpt-oss-20b:free, cognitivecomputations/dolphin-mistral-24b-venice-edition:free, +5
prompt_templateCOMBOCustom8 options: Custom, extract_person_features.md, image_to_prompt.md, photography_en.md, photography_zh.md, qwen2512_en.md, +2
seedINT-1-1–18446744073709550000隨機種子控制(-1為隨機)。注意:圖像生成模型(如Gemini)不支援seed參數
custom_modeloptSTRING
system_promptoptSTRING
enable_resizeoptBOOLEANfalse啟用圖像尺寸調整功能
target_widthoptINT102464–2048需要啟用resize才會生效
target_heightoptINT102464–2048需要啟用resize才會生效
resize_methodoptCOMBOlanczos需要啟用resize才會生效
image_input_1optIMAGE
image_input_2optIMAGE
image_input_3optIMAGE

Outputs (2)

NameTypeDescription
image_outputIMAGE
text_outputSTRING