OpenRouter LLM
Run 70B-class LLMs inside ComfyUI without owning a GPU
- image_input_1
- image_input_2
- image_input_3
- image_output
- text_output
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:freevariants.text_model- dropdown of ~10 mostly-free OpenRouter models, plus an "Add Custom Model..." option where you type intocustom_model. Default isgoogle/gemma-3-27b-it:free, which is a solid prompt-optimizer.user_prompt- your actual request. Multiline.prompt_template- pick a.mdtemplate from the pack'sPromptfolder (photography, image-to-prompt, person-feature extraction, video-frame transitions…) or leave "Custom" and write your ownsystem_prompt.image_input_1/2/3- optional images for vision models.enable_resizewithtarget_width/target_height/resize_method- pads or scales images to a fixed size before upload. Only active whenenable_resizeis 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.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| user_prompt | STRING | Please analyze the provided content. | — |
| text_model | COMBO | google/gemma-3-27b-it:free | 11 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_template | COMBO | Custom | 8 options: Custom, extract_person_features.md, image_to_prompt.md, photography_en.md, photography_zh.md, qwen2512_en.md, +2 |
| seed | INT | -1-1–18446744073709550000 | 隨機種子控制(-1為隨機)。注意:圖像生成模型(如Gemini)不支援seed參數 |
| custom_modelopt | STRING | — | |
| system_promptopt | STRING | — | |
| enable_resizeopt | BOOLEAN | false | 啟用圖像尺寸調整功能 |
| target_widthopt | INT | 102464–2048 | 需要啟用resize才會生效 |
| target_heightopt | INT | 102464–2048 | 需要啟用resize才會生效 |
| resize_methodopt | COMBO | lanczos | 需要啟用resize才會生效 |
| image_input_1opt | IMAGE | — | |
| image_input_2opt | IMAGE | — | |
| image_input_3opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image_output | IMAGE | — |
| text_output | STRING | — |