This is a ComfyUI extension that runs any model on OpenRouter with your own API key. It has six kinds of nodes:
Requests go from your ComfyUI server to OpenRouter, which passes them to the model's provider and bills your OpenRouter account. Every run of a paid node is billed, so check the model's price in OpenRouter models before you run it.
ComfyUI/custom_nodes/comfyui-openrouter, with
__init__.py and requirements.txt directly inside that folder.requirements.txt with the Python that runs ComfyUI, using the
command for your installation below.ComfyUI folder
that holds main.py, and put the extension in its custom_nodes folder.pip install -r custom_nodes/comfyui-openrouter/requirements.txt
Then start the installation. Comfy Desktop's Manage panel explains these controls.
From the ComfyUI folder, replacing .venv if your environment has another name:
.venv/bin/python -m pip install -r custom_nodes/comfyui-openrouter/requirements.txt
With uv:
uv pip install --python .venv/bin/python -r custom_nodes/comfyui-openrouter/requirements.txt
From the ComfyUI folder, in PowerShell:
.\.venv\Scripts\python.exe -m pip install -r .\custom_nodes\comfyui-openrouter\requirements.txt
From the folder that holds ComfyUI and python_embeded, in PowerShell:
.\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\comfyui-openrouter\requirements.txt
To update or remove the extension, see the advanced guide.
To stop a run, use ComfyUI's cancel button. To send the same request again, change run number. Each request's charge is listed at openrouter.ai/activity.
There are 13 example workflows, and together they use every node. Most of them have Jev decide something: which image to keep, whether a draft is distorted, or whether an answer is backed by its sources.
Open one from Browse Templates → comfyui-openrouter, or drag its file onto ComfyUI. Each group has a note that says what it does; start with Start Here. Each step after the inputs is a subgraph: select the icon at its top-right corner to open it. Media inputs start empty, so add your own image, audio, or document.
Some workflows use ComfyUI's If/Else Switch (beta). It runs only the branch it picks, so you pay only for the paid nodes on that branch.
After an update, open the examples in a new tab to get the new versions.
| Workflow | Input | Node guide |
|---|---|---|
| Chat: Write a Product Listing | Two product photos and a spec sheet | Chat: Attach Document |
| Chat: Caption a Training Set | A folder of images | Chat: Ask |
| Workflow | Input | Node guide |
|---|---|---|
| Image: Pick the Best Image for an Occasion | A brief | Image: Generate |
| Image: Reject Distorted Images | A subject | Search: Embed |
| Image: Edit with the Best Idea | A product photo and a campaign | Decision: Read Answer |
| Image: Design a Logo | A brand description | Image: Generate |
| Workflow | Input | Node guide |
|---|---|---|
| Video: Animate a Product Shot | A brief | Video: Generate |
| Video: Recover a Cancelled Video | A cancelled video job | Video: Download |
| Workflow | Input | Node guide |
|---|---|---|
| Audio: Triage a Voicemail | A voicemail | Audio: Transcribe |
| Audio: Dub a Clip | A short clip of one speaker | Audio: Speak |
| Workflow | Input | Node guide |
|---|---|---|
| Search: Answer from Help Articles | A question and help articles | Search: Rank |
| Search: Choose a Hero Image | A brief | Search: Rank |
| Workflow | Input | Node guide |
|---|---|---|
| Decision: Verify a Quick Answer, Then Escalate | Notes and a question | Decision: Ask |
Request Options is used in Chat: Write a Product Listing, to keep the listing away from providers that store data.
The nodes are in the OpenRouter menu, under Chat, Image, Video, Audio, Search, and Decision. ComfyUI's node help opens each node's guide.
| Node | What it does |
|---|---|
| Chat: Ask | Asks a model a question, with images, video, audio, or documents. |
| Chat: Attach Document | Attaches a PDF or text file from ComfyUI's input folder. |
| Image: Generate | Generates or edits images. |
| Video: Generate | Makes a video from a prompt, frames, or reference media. |
| Video: Download | Downloads a video that OpenRouter kept making after a run stopped. |
| Audio: Speak | Turns text into speech, optionally in a cloned voice. |
| Audio: Transcribe | Turns speech into text, with timed segments, words, and subtitles. |
| Search: Embed | Turns text and images into embeddings and compares them. |
| Search: Rank | Ranks text and images by how well they match a query. |
| Decision: Ask | Asks Jev questions about a situation. |
| Decision: Add Question | Adds a yes-or-no, one-choice, or score question. |
| Decision: Read Answer | Reads one answer as text, a yes flag, and numbers. |
| Request Options | Sets providers, price limits, and extra request fields for the paid nodes. |
The decision nodes use OpenRouter's alpha decisions API
(/api/alpha/decisions), which OpenRouter may still change.
The extension ships with a copy of OpenRouter's model list. To get the current list and prices, open Extensions → OpenRouter → OpenRouter models and select Refresh Models. The node dropdowns update after a refresh. The same dialog estimates prices.
To use a model that is not in the list, choose other model ID in a node's
model dropdown and type its ID. You can add a suffix, such as :online for web
search.
Automatic checks tell you when OpenRouter's list has changed; select Refresh Models to take the new list. See model updates.
Node inputs ──▶ ComfyUI server (the key and settings stay here)
│ checks the inputs against the chosen model
▼
OpenRouter ──▶ the model's provider
│
▼
Node outputs ◀── text, images, video, audio, and answers
images from a text-only model, are skipped.The advanced guide lists what each node sends and returns.
Development needs Git and mise. Tell the checks where ComfyUI is, in
.mise.local.toml:
[env]
COMFYUI_PATH = "/path/to/ComfyUI"
COMFYUI_PYTHON = "/path/to/ComfyUI/.venv/bin/python"
Install the tools, dependencies, and Git hooks, and run the full check:
mise trust
mise run repo:setup
mise run repo:check
Restart ComfyUI after changing Python. After changing the browser code, run
mise run comfy:frontend:build; after changing a workflow description, run
mise run comfy:workflows:build. The advanced guide
lists every task.
| Problem | Fix |
|---|---|
| No OpenRouter nodes in the menu | Check that the folder is ComfyUI/custom_nodes/comfyui-openrouter, ComfyUI is 0.34.6 or later, and the console shows no import error. |
| No OpenRouter entry under Extensions | Check that web/extension.js exists in the extension's folder, then reload the window. |
| "Set your OpenRouter API key..." | Save the key in OpenRouter settings, or set OPENROUTER_API_KEY and restart ComfyUI. |
| The settings cannot be changed | ComfyUI runs in multi-user mode or is open from another computer. Set OPENROUTER_API_KEY where ComfyUI starts instead. |
| A model is missing from a dropdown | Select Refresh Models in OpenRouter models, or choose other model ID and type it. |
| "Value not in list" for a model | OpenRouter no longer lists the model. Choose another, or type its ID in other model ID. |
| A video was not ready in time | OpenRouter keeps making it. Add Video: Download, choose the job, and select Run. |
pydantic cannot be imported | Install requirements.txt with the Python that runs ComfyUI, then restart. |
| Node help is missing | Reinstall the whole extension, including web/docs. |
| The templates are missing | Reinstall the whole extension, including example_workflows. |
| Nodes or menus appear twice | Keep one comfyui-openrouter folder in custom_nodes; move copies elsewhere. |
For the messages a node shows, see troubleshooting. The advanced guide also covers keys, settings, limits, prices, model updates, caching, and video recovery.
The code, guides, and workflows are under the MIT license. Third-party components keep their own licenses.
38 commits
Python
69.4%
JavaScript
19.8%
TypeScript
5.6%
Shell
4.5%
This is a ComfyUI extension that runs any model on OpenRouter with your own API key. It has six kinds of nodes:
Requests go from your ComfyUI server to OpenRouter, which passes them to the model's provider and bills your OpenRouter account. Every run of a paid node is billed, so check the model's price in OpenRouter models before you run it.
ComfyUI/custom_nodes/comfyui-openrouter, with
__init__.py and requirements.txt directly inside that folder.requirements.txt with the Python that runs ComfyUI, using the
command for your installation below.ComfyUI folder
that holds main.py, and put the extension in its custom_nodes folder.pip install -r custom_nodes/comfyui-openrouter/requirements.txt
Then start the installation. Comfy Desktop's Manage panel explains these controls.
From the ComfyUI folder, replacing .venv if your environment has another name:
.venv/bin/python -m pip install -r custom_nodes/comfyui-openrouter/requirements.txt
With uv:
uv pip install --python .venv/bin/python -r custom_nodes/comfyui-openrouter/requirements.txt
From the ComfyUI folder, in PowerShell:
.\.venv\Scripts\python.exe -m pip install -r .\custom_nodes\comfyui-openrouter\requirements.txt
From the folder that holds ComfyUI and python_embeded, in PowerShell:
.\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\comfyui-openrouter\requirements.txt
To update or remove the extension, see the advanced guide.
To stop a run, use ComfyUI's cancel button. To send the same request again, change run number. Each request's charge is listed at openrouter.ai/activity.
There are 13 example workflows, and together they use every node. Most of them have Jev decide something: which image to keep, whether a draft is distorted, or whether an answer is backed by its sources.
Open one from Browse Templates → comfyui-openrouter, or drag its file onto ComfyUI. Each group has a note that says what it does; start with Start Here. Each step after the inputs is a subgraph: select the icon at its top-right corner to open it. Media inputs start empty, so add your own image, audio, or document.
Some workflows use ComfyUI's If/Else Switch (beta). It runs only the branch it picks, so you pay only for the paid nodes on that branch.
After an update, open the examples in a new tab to get the new versions.
| Workflow | Input | Node guide |
|---|---|---|
| Chat: Write a Product Listing | Two product photos and a spec sheet | Chat: Attach Document |
| Chat: Caption a Training Set | A folder of images | Chat: Ask |
| Workflow | Input | Node guide |
|---|---|---|
| Image: Pick the Best Image for an Occasion | A brief | Image: Generate |
| Image: Reject Distorted Images | A subject | Search: Embed |
| Image: Edit with the Best Idea | A product photo and a campaign | Decision: Read Answer |
| Image: Design a Logo | A brand description | Image: Generate |
| Workflow | Input | Node guide |
|---|---|---|
| Video: Animate a Product Shot | A brief | Video: Generate |
| Video: Recover a Cancelled Video | A cancelled video job | Video: Download |
| Workflow | Input | Node guide |
|---|---|---|
| Audio: Triage a Voicemail | A voicemail | Audio: Transcribe |
| Audio: Dub a Clip | A short clip of one speaker | Audio: Speak |
| Workflow | Input | Node guide |
|---|---|---|
| Search: Answer from Help Articles | A question and help articles | Search: Rank |
| Search: Choose a Hero Image | A brief | Search: Rank |
| Workflow | Input | Node guide |
|---|---|---|
| Decision: Verify a Quick Answer, Then Escalate | Notes and a question | Decision: Ask |
Request Options is used in Chat: Write a Product Listing, to keep the listing away from providers that store data.
The nodes are in the OpenRouter menu, under Chat, Image, Video, Audio, Search, and Decision. ComfyUI's node help opens each node's guide.
| Node | What it does |
|---|---|
| Chat: Ask | Asks a model a question, with images, video, audio, or documents. |
| Chat: Attach Document | Attaches a PDF or text file from ComfyUI's input folder. |
| Image: Generate | Generates or edits images. |
| Video: Generate | Makes a video from a prompt, frames, or reference media. |
| Video: Download | Downloads a video that OpenRouter kept making after a run stopped. |
| Audio: Speak | Turns text into speech, optionally in a cloned voice. |
| Audio: Transcribe | Turns speech into text, with timed segments, words, and subtitles. |
| Search: Embed | Turns text and images into embeddings and compares them. |
| Search: Rank | Ranks text and images by how well they match a query. |
| Decision: Ask | Asks Jev questions about a situation. |
| Decision: Add Question | Adds a yes-or-no, one-choice, or score question. |
| Decision: Read Answer | Reads one answer as text, a yes flag, and numbers. |
| Request Options | Sets providers, price limits, and extra request fields for the paid nodes. |
The decision nodes use OpenRouter's alpha decisions API
(/api/alpha/decisions), which OpenRouter may still change.
The extension ships with a copy of OpenRouter's model list. To get the current list and prices, open Extensions → OpenRouter → OpenRouter models and select Refresh Models. The node dropdowns update after a refresh. The same dialog estimates prices.
To use a model that is not in the list, choose other model ID in a node's
model dropdown and type its ID. You can add a suffix, such as :online for web
search.
Automatic checks tell you when OpenRouter's list has changed; select Refresh Models to take the new list. See model updates.
Node inputs ──▶ ComfyUI server (the key and settings stay here)
│ checks the inputs against the chosen model
▼
OpenRouter ──▶ the model's provider
│
▼
Node outputs ◀── text, images, video, audio, and answers
images from a text-only model, are skipped.The advanced guide lists what each node sends and returns.
Development needs Git and mise. Tell the checks where ComfyUI is, in
.mise.local.toml:
[env]
COMFYUI_PATH = "/path/to/ComfyUI"
COMFYUI_PYTHON = "/path/to/ComfyUI/.venv/bin/python"
Install the tools, dependencies, and Git hooks, and run the full check:
mise trust
mise run repo:setup
mise run repo:check
Restart ComfyUI after changing Python. After changing the browser code, run
mise run comfy:frontend:build; after changing a workflow description, run
mise run comfy:workflows:build. The advanced guide
lists every task.
| Problem | Fix |
|---|---|
| No OpenRouter nodes in the menu | Check that the folder is ComfyUI/custom_nodes/comfyui-openrouter, ComfyUI is 0.34.6 or later, and the console shows no import error. |
| No OpenRouter entry under Extensions | Check that web/extension.js exists in the extension's folder, then reload the window. |
| "Set your OpenRouter API key..." | Save the key in OpenRouter settings, or set OPENROUTER_API_KEY and restart ComfyUI. |
| The settings cannot be changed | ComfyUI runs in multi-user mode or is open from another computer. Set OPENROUTER_API_KEY where ComfyUI starts instead. |
| A model is missing from a dropdown | Select Refresh Models in OpenRouter models, or choose other model ID and type it. |
| "Value not in list" for a model | OpenRouter no longer lists the model. Choose another, or type its ID in other model ID. |
| A video was not ready in time | OpenRouter keeps making it. Add Video: Download, choose the job, and select Run. |
pydantic cannot be imported | Install requirements.txt with the Python that runs ComfyUI, then restart. |
| Node help is missing | Reinstall the whole extension, including web/docs. |
| The templates are missing | Reinstall the whole extension, including example_workflows. |
| Nodes or menus appear twice | Keep one comfyui-openrouter folder in custom_nodes; move copies elsewhere. |
For the messages a node shows, see troubleshooting. The advanced guide also covers keys, settings, limits, prices, model updates, caching, and video recovery.
The code, guides, and workflows are under the MIT license. Third-party components keep their own licenses.
38 commits
Python
69.4%
JavaScript
19.8%
TypeScript
5.6%
Shell
4.5%