Claude Chat
Claude Chat Wants No Anthropic Key, and That's the Whole Trick
- images
- history
- provider
- text
- thought
- history
Read the pack's own one-liner for this node and you'll spot the odd bit: "Anthropic Claude via OpenRouter or an OpenAI-compatible relay." No mention of Anthropic's own API. That's deliberate. This node calls Claude the way most of the ecosystem actually reaches it - through a router - so the key you need is an OpenRouter key (or whatever relay you've got), not one from Anthropic's console.
Whether that's a feature or an annoyance depends on your situation. If you already pay OpenRouter to reach six vendors with one balance, it's the least fuss possible. If you have an Anthropic key and nothing else, you'll want a different node, because this one has no route for you.
What it does in a graph
Same shape as the other chat nodes in the pack: prompt in, text out, optional images in for vision. The classic uses are prompt rewriting (rough idea → structured prompt for your Z-Image or Flux encoder), captioning a handful of images, and dialogue generation for video clips. The KB's llm-in-comfyui.md makes the useful point that this job wants a small and obedient model, not a reasoner - so pick a mid-tier Claude, not the biggest one, and you'll get faster runs and less scratch-work leaking into your prompt.
Underneath, the node is a thin shell. It picks a route from the Claude family based on the connected provider, builds a request, and hands it to a shared runtime that retries and converts the response. There is no local model, no VRAM cost, and no offline mode.
Inputs you'll actually touch
- prompt - multiline, sent as the user turn. Be explicit about format here; a chat model's default behaviour is to chat.
- model - a dynamic dropdown (Claude Opus / Sonnet / Haiku versions). The inputs below it change with your selection, which is why you'll see
reasoning_effortandmax_output_tokenson the newer models and plain sampling controls on older ones.Custom modelappears in the list too, letting you type any Claude model ID the provider recognises. - seed -
0lets the provider pick. Non-zero is sent when the route supports it, and changing it forces a re-run, which is how you get a second sample without touching the prompt. - images - the autogrow vision socket; connect one and a second slot appears. Up to 20 on this node. Batches are expanded, so a 4-image batch eats 4 of those slots.
- system_prompt - the instructing half. For prompt-writing jobs this is where the value is: "reply with the prompt only, no preamble, no quotes."
- history - feed it back in and you get a continuation. This is how multi-turn work happens inside a graph.
- retry_count - total attempts, with a ~3 second pause between them. Leave it at 1 while debugging.
- extra - a JSON object merged into the request for anything the node doesn't expose.
Outputs are text, thought, and history. thought is the model's reasoning text where the route reports it - on Claude that's the extended-thinking stream - and it's empty when there isn't any. It's genuinely useful for seeing why a rewrite came out the way it did. history pipes straight back into another chat node's history input, or into the pack's History Builder.
Install and key
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes
cd ComfyUI-YogurtNodes
pip install -r requirements.txt
Then either connect a Provider: OpenRouter node and paste your key, or leave the provider socket empty and put it in custom_nodes/ComfyUI-YogurtNodes/yogurt_nodes/llm/api_key.json:
{ "openrouter": "sk-or-..." }
OPENROUTER_API_KEY works as well. Precedence is node field → JSON → environment variable.
Things that go wrong
Empty text with a confident history. You asked for JSON and got prose wrapped in a preamble. This is the defining failure of LLM-in-a-graph, and the fix is a stricter system_prompt plus a regex node downstream. Every chat node in this pack has the same weak spot.
thought full of text you didn't want. Extended thinking is on by default on several Claude versions here; reasoning_effort is the dial. Set it to off where the model allows it if you just want the answer.
Provider mismatch. Connect a provider that doesn't offer the model you selected and the error names the ones that do. That's the pack being helpful; read it and re-wire.
Long prompts failing with an auth-shaped error. If a proxy is configured and dropping, retries can burn your attempts before the connection settles. Bump timeout, or drop the proxy for a test run.
One caution that applies to every API node, not just this one: it holds a credential and calls the network by design, which is exactly the shape of thing that got weaponized in the ComfyUI_LLMVISION incident (the KB's llm-in-comfyui.md covers it). A pack this obscure is a read-before-you-run situation. This one is MIT-licensed and readable in an afternoon, which is more than most offer.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Prompt sent to the model. | |
| model | COMBO | Model version; the inputs below change with the selected model. | |
| seed | INT | 00–2147483647 | Sent to the API when the model supports it; changing it also forces a re-run. 0 lets the API pick a random seed. |
| extra | STRING | Optional JSON object merged into the request (for parameters not exposed as inputs). | |
| images | COMFY_AUTOGROW_V3 | Optional reference image(s); batches are expanded. Up to 20. | |
| retry_count | INT | 11–10 | Total attempts on failure. |
| system_promptopt | STRING | System instruction sent with the request. | |
| historyopt | HISTORY | Previous turns. | |
| provideropt | YOGURT_LLM_PROVIDER | Provider node. When unconnected, the official API is used with keys from api_key.json or environment variables. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| thought | STRING | — |
| history | HISTORY | — |