ComfyPilotComfyPilot
工作流 / LLM / OpenRouter LLM
OpenRouter LLM

OpenRouter LLM

OpenRouter LLM

从OpenRouter精选列表中选择一个模型(Claude、GPT、Gemini等)。生成文本响应,并可选择上传媒体文件以用于支持视觉的模型。

LLM 4 个节点 1 个输入 15 次使用 ComfyUI ≥ 0.22.1 ComfyUI 5 KB

下载工作流 JSON 查看官方来源

下载后把文件拖进 ComfyUI 窗口即可打开。

节点构成

OpenRouterLLMNode × 1
LoadImage × 1
PreviewAny × 1
MarkdownNote × 1

官方标注的模型

OpenRouter

工作流 JSON

和上面「下载工作流 JSON」是同一份文件。

1{
2 "id": "4e058ab6-c976-4f8d-be9a-ccfda1fce1da",
3 "revision": 0,
4 "last_node_id": 4,
5 "last_link_id": 2,
6 "nodes": [
7 {
8 "id": 1,
9 "type": "OpenRouterLLMNode",
10 "pos": [
11 -1330,
12 0
13 ],
14 "size": [
15 420,
16 420
17 ],
18 "flags": [],
19 "order": 2,
20 "mode": 0,
21 "showAdvanced": true,
22 "inputs": [
23 {
24 "label": "image_1",
25 "name": "model.images.image_1",
26 "shape": 7,
27 "type": "IMAGE",
28 "link": 1
29 },
30 {
31 "label": "image_2",
32 "name": "model.images.image_2",
33 "shape": 7,
34 "type": "IMAGE",
35 "link": null
36 }
37 ],
38 "outputs": [
39 {
40 "name": "STRING",
41 "type": "STRING",
42 "links": [
43 2
44 ]
45 }
46 ],
47 "properties": {
48 "Node name for S&R": "OpenRouterLLMNode"
49 },
50 "widgets_values": [
51 "Analyze the attached reference image and output a single, ready-to-use text-to-image prompt.",
52 "anthropic/claude-opus-4.7",
53 "off",
54 386110317,
55 "randomize",
56 "You are an expert prompt engineer for diffusion and flow-matching image models (e.g. FLUX, SDXL). Study the reference image: main subject, pose, composition, framing, lighting, color palette, materials, art style, mood, and level of detail. Write one concise positive prompt that would recreate a similar image—comma-separated tags are fine. Prefer concrete visual descriptors over abstract commentary. Do not describe your process. Output only the generation prompt."
57 ],
58 "color": "#432",
59 "bgcolor": "#653"
60 },
61 {
62 "id": 2,
63 "type": "LoadImage",
64 "pos": [
65 -1650,
66 0
67 ],
68 "size": [
69 290,
70 370
71 ],
72 "flags": [],
73 "order": 0,
74 "mode": 0,
75 "inputs": [],
76 "outputs": [
77 {
78 "name": "IMAGE",
79 "type": "IMAGE",
80 "links": [
81 1
82 ]
83 },
84 {
85 "name": "MASK",
86 "type": "MASK",
87 "links": null
88 }
89 ],
90 "properties": {
91 "Node name for S&R": "LoadImage"
92 },
93 "widgets_values": [
94 "contact_sheet_app_input_1.png",
95 "image"
96 ]
97 },
98 {
99 "id": 3,
100 "type": "PreviewAny",
101 "pos": [
102 -890,
103 0
104 ],
105 "size": [
106 430,
107 380
108 ],
109 "flags": [],
110 "order": 3,
111 "mode": 0,
112 "inputs": [
113 {
114 "name": "source",
115 "type": "*",
116 "link": 2
117 }
118 ],
119 "outputs": [
120 {
121 "name": "STRING",
122 "type": "STRING",
123 "links": null
124 }
125 ],
126 "properties": {
127 "Node name for S&R": "PreviewAny"
128 },
129 "widgets_values": [
130 null,
131 null,
132 null
133 ]
134 },
135 {
136 "id": 4,
137 "type": "MarkdownNote",
138 "pos": [
139 -2250,
140 0
141 ],
142 "size": [
143 560,
144 970
145 ],
146 "flags": [],
147 "order": 1,
148 "mode": 0,
149 "inputs": [],
150 "outputs": [],
151 "properties": [],
152 "widgets_values": [
153 "# OpenRouter LLM\n\nThis API node sends chat requests through OpenRouter using a curated model list (Claude, GPT, Gemini, Grok, DeepSeek, Qwen, Mistral, GLM, Kimi, Perplexity Sonar, and others).\n\n## Inputs change with the selected model\n\nThe **model** dropdown is a dynamic combo: switching models updates which inputs appear and how many media slots you get.\n\n- **Images / videos** — Shown only for vision-capable models. Max slots vary by model (e.g. up to 20 images on Claude, GPT, Grok, and Gemini; 10 on Qwen and Kimi; 8 on Mistral). Gemini 3.5 Flash and Qwen 3.6 Plus/Flash also expose video inputs.\n- **Reasoning effort** — Available on reasoning and frontier-reasoning models (`off` / `low` / `medium` / `high`). Not shown on standard text-only models.\n- **Search context size** — Available on Perplexity Sonar models for web-grounded answers.\n\nModels without vision support hide image and video inputs entirely.\n\n## This workflow\n\n1. **Load Image** feeds a reference into the model’s image slot(s).\n2. **OpenRouter LLM** analyzes the image and returns a text-to-image prompt (see **prompt** and **system_prompt** on the node).\n3. **Preview Any** displays the string for copy-paste into downstream image generation nodes.\n\nToken pricing is shown on the node badge and depends on the selected model."
154 ],
155 "color": "#222",
156 "bgcolor": "#000"
157 }
158 ],
159 "links": [
160 [
161 1,
162 2,
163 0,
164 1,
165 0,
166 "IMAGE"
167 ],
168 [
169 2,
170 1,
171 0,
172 3,
173 0,
174 "STRING"
175 ]
176 ],
177 "groups": [],
178 "config": [],
179 "extra": {
180 "ds": {
181 "scale": 0.5685279105002078,
182 "offset": [
183 2642.25070470376,
184 653.2569952034215
185 ]
186 },
187 "frontendVersion": "1.45.12"
188 },
189 "version": 0.4
190}