Provider: OpenRouter
OpenRouter — one key, and a vote on who actually runs your model
- provider
If you've ever wanted a closed model in your graph but didn't fancy holding four separate API keys, this node is the shortcut. OpenRouter is a router: one key, one bill, and behind it Claude, Gemini/Nano Banana, GPT Image, Qwen Image, Seedream, Grok. In this pack the Provider: OpenRouter node is what you plug into the provider input of any model node that has an OpenRouter route - and in one case it's the family default, because Claude Chat ships pointing at OpenRouter.
Do be clear about what it is, because the name oversells it. It does not call anything when it runs. It's a settings carrier: you fill in a key and some routing preferences, it hands those to the model node that's actually doing the work.
What it actually does
The node's single output is provider (type YOGURT_LLM_PROVIDER). Wire that into a model node and you've told it where the request goes. Mechanically the provider node just packages up the connection settings; the model node resolves them, and if the model you picked doesn't have a route for that provider, you get a plain error naming the providers that do support it. So there's no silent fallback to a different vendor - wrong pairing, loud failure.
The base URL is baked in (https://openrouter.ai/api/v1). There's no field for it here, on purpose: OpenRouter is OpenRouter.
The inputs that matter
api_key- leave it empty unless you want to override per-workflow. Empty falls back to the"openrouter"key in the pack'sapi_key.json, then to theOPENROUTER_API_KEYenvironment variable. Empty is the right answer for anything you'll share, since a key typed into a widget is saved into the workflow JSON.provider_order- comma-separated upstream providers to try in order, e.g.google-vertex,openai. This is OpenRouter's own provider routing, and it's the actual reason this node exists over a plain "OpenRouter provider with a key": the same model served by different hosts is not always the same experience, and sometimes it's not the same price or the same data-handling policy.allow_fallbacks- on by default. Ifprovider_orderfails, OpenRouter silently uses someone else. Turn it off when pinning is the point (a privacy requirement, a region, a host you've measured as better). Then a provider outage becomes your problem instead of a surprise reroute.proxy_urlandtimeout- a proxy such ashttp://127.0.0.1:7890orsocks5://127.0.0.1:1080, and a request timeout where0means no limit. Image calls run tens of seconds to minutes, so leave it at 0 unless you like failed runs.
For most people: leave everything at default, put the key in api_key.json, done.
Installing
Standard for the pack. In ComfyUI Manager search the pack title and install; or:
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes && pip install -r requirements.txt
Restart ComfyUI. The node lives under YogurtNodes/LLM/Providers, and at runtime its display name carries a " (Yogurt Nodes)" suffix - that's the pack convention for all 183 of its nodes, so search for that if nothing turns up.
Key file goes here, and this is the priority order:
# custom_nodes/ComfyUI-YogurtNodes/yogurt_nodes/llm/api_key.json
{ "openrouter": "sk-or-v1-..." }
Node field beats the file, file beats the environment variable. It lives inside the pack folder, which is worth knowing before you zip that folder into a bug report.
Where people get burned
The "API key is not set" error lists all three places it looked - read it, it's telling you exactly which slot you forgot. Beyond that: a 401 means the key is wrong or stale; a 429 or an upstream error usually means an OpenRouter provider is having a bad day, and the model node's retry_count is your lever (it retries, waits 3 seconds between attempts, and then raises with the real reason attached).
One nice trick: the pack's model nodes include a Custom model entry where the family has one. Fill in a model id (an OpenRouter free image endpoint, for instance) and you can drive a model the pack has never heard of through this same provider node. And a closing word of caution from the wider ecosystem: a node that holds your API key and phones out by design is exactly the shape of the one node pack that got people hacked back in 2024. Read what a fresh pack does before its first run, and keep your key out of the graph.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | Leave empty to use 'openrouter' from api_key.json, then the OPENROUTER_API_KEY environment variable. | |
| provider_order | STRING | Comma-separated upstream providers to try in order, e.g. google-vertex,openai. | |
| allow_fallbacks | BOOLEAN | true | Allow other upstream providers when provider_order fails. |
| proxy_url | STRING | Proxy URL, e.g. http://127.0.0.1:7890 or socks5://127.0.0.1:1080. | |
| timeout | INT | 00–3600 | Request timeout in seconds; 0 means no limit. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| provider | YOGURT_LLM_PROVIDER | — |