> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter LLM Partner Nodes ComfyUI Official Example

> Use the OpenRouter LLM partner node in ComfyUI for chat, reasoning, vision, and web-grounded answers across multiple frontier models.

[OpenRouter](https://openrouter.ai) is a unified routing platform for large language models. It exposes many providers through one API so you can switch models without changing your integration. ComfyUI connects through the **OpenRouter LLM** partner node, which offers a curated list of text and multimodal models—Claude, GPT, Gemini, Grok, DeepSeek, Qwen, Mistral, GLM, Kimi, and Perplexity Sonar—in a single node.

<Tip>
  To use the Partner Nodes, you need to ensure that you are logged in properly and using a permitted network environment. Please refer to the [Partner Nodes Overview](/tutorials/partner-nodes/overview) section of the documentation to understand the specific requirements for using the Partner Nodes.
</Tip>

<Tip>
  <Tabs>
    <Tab title="Portable or self deployed users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      If you can't find them in the template, your ComfyUI may be outdated. (Desktop version's update will delay sometime)

      If nodes are missing when loading a workflow, possible reasons:

      1. You are not using the latest ComfyUI version (Nightly version)
      2. Some nodes failed to import at startup
    </Tab>

    <Tab title="Desktop or Cloud users">
      * The Desktop is base on ComfyUI stable release, it will auto-update when there is a new Desktop stable release available.
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

## What you can do

* **Text chat** — prompts and optional `system_prompt` for role or task instructions
* **Vision** — attach reference images on supported models (slot count depends on the model)
* **Video input** — Gemini 3.5 Flash and Qwen 3.6 Plus/Flash support optional reference videos
* **Reasoning** — `reasoning_effort` on reasoning / frontier-reasoning models (`off`, `low`, `medium`, `high`)
* **Web search** — Perplexity Sonar models expose `search_context_size` for grounded answers

Token pricing is listed under [Partner Node Pricing](/tutorials/partner-nodes/pricing#openrouter).

## Supported models

| Model                            | Vision (max images) | Video   | Extra options                         |
| :------------------------------- | :------------------ | :------ | :------------------------------------ |
| `anthropic/claude-opus-4.7`      | 20                  | —       | Reasoning effort                      |
| `openai/gpt-5.5-pro`             | 20                  | —       | Reasoning effort                      |
| `openai/gpt-5.5`                 | 20                  | —       | Reasoning effort                      |
| `google/gemini-3.5-flash`        | 20                  | Up to 4 | Reasoning effort                      |
| `x-ai/grok-4.20`                 | 20                  | —       | Reasoning effort                      |
| `x-ai/grok-4.3`                  | 20                  | —       | Reasoning effort                      |
| `deepseek/deepseek-v4-pro`       | —                   | —       | Reasoning effort                      |
| `deepseek/deepseek-v4-flash`     | —                   | —       | Reasoning effort                      |
| `deepseek/deepseek-v3.2`         | —                   | —       | Reasoning effort                      |
| `qwen/qwen3.6-max-preview`       | —                   | —       | Reasoning effort                      |
| `qwen/qwen3.6-plus`              | 10                  | Up to 4 | Reasoning effort                      |
| `qwen/qwen3.6-flash`             | 10                  | Up to 4 | Reasoning effort                      |
| `mistralai/mistral-large-2512`   | 8                   | —       | —                                     |
| `mistralai/mistral-medium-3-5`   | 8                   | —       | Reasoning effort                      |
| `z-ai/glm-4.6`                   | —                   | —       | Reasoning effort                      |
| `z-ai/glm-5`                     | —                   | —       | Reasoning effort                      |
| `moonshotai/kimi-k2.6`           | 10                  | —       | Reasoning effort                      |
| `moonshotai/kimi-k2-thinking`    | —                   | —       | Reasoning effort                      |
| `perplexity/sonar-pro`           | —                   | —       | Search context size                   |
| `perplexity/sonar-reasoning-pro` | —                   | —       | Search context size, reasoning effort |
| `perplexity/sonar-deep-research` | —                   | —       | Search context size, reasoning effort |

## Model-specific inputs

The **model** dropdown is a dynamic combo. When you change the model, the node updates which inputs appear:

* **Image slots** — shown only for vision-capable models; the number of slots matches the model limit
* **Video slots** — shown only on Gemini 3.5 Flash and Qwen 3.6 Plus/Flash
* **Reasoning effort** — shown on reasoning and frontier-reasoning models
* **Search context size** — shown on Perplexity Sonar models

Text-only models hide image and video inputs.

## Example workflow (`api_openrouter_llm`)

The template below is **one example**, not the only way to use the node. Download it to see how inputs connect, then adapt the graph for your task—pure text chat, captioning, prompt rewriting, feeding strings into image nodes, or anything else that fits your pipeline.

<Card title="Run in Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=api_openrouter_llm&utm_source=docs&utm_medium=referral&utm_campaign=openrouter_llm">
  Open in Comfy Cloud
</Card>

<Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_openrouter_llm.json">
  Download JSON or search "OpenRouter LLM" in Template Library
</Card>

<Note>
  In this sample, the workflow analyzes a reference image and returns a text-to-image prompt for downstream image nodes. You can omit **Load Image**, change the prompts, or rebuild the graph entirely for your own use case.
</Note>

If you use the template as a reference, a typical run looks like this:

1. In **Load Image**, load the reference image (skip for text-only chat)
2. In **OpenRouter LLM**, connect the image to `image_1` (more slots appear when the model supports them)
3. Set **prompt** — e.g. ask the model to analyze the image and output a generation prompt
4. (Optional) Set **system\_prompt** in advanced options for tone, format, or constraints
5. Pick a **model**; adjust **reasoning\_effort** or **search\_context\_size** when shown
6. Click **Run** or press `Ctrl(cmd) + Enter`
7. View the reply in **Preview Any**

### Additional notes

* **seed** — set to `0` to omit; most models treat it as a hint only
* Reference images and videos are uploaded automatically when the workflow runs; you only wire ComfyUI image/video outputs into the node
* For pricing per model, see [OpenRouter on the pricing page](/tutorials/partner-nodes/pricing#openrouter)
