Simple LLM Config: Claude
Pick a model, plug a key, cap the temperature at 1.0
- LLM_CONFIG
Every LLM workflow in this pack starts the same way: a config node that says which provider, which model, and how spicy. Simple LLM Config: Claude is the Anthropic one. It's a tiny node that just builds a settings object (an LLM_CONFIG) - no API call happens here. The actual generation happens later, when you feed this config into an agent and run it. If you've used the OpenAI or Gemini variants in this pack, this is the same shape with Claude's dials.
Claude's the choice when you want long-form reasoning, strong instruction following, or writing that doesn't read like it was assembled by a committee. The current model list skews new: the default is claude-sonnet-4-6, and you also get haiku (the cheap fast one), opus (the expensive brain), and a couple of the 3.5-generation models for stability.
How it works
The node packs driver: "claude", your model, temperature, and max_tokens into a dict and emits it as LLM_CONFIG. When you eventually run a prompt, the pack's Claude driver POSTs to Anthropic's /v1/messages endpoint directly over HTTP - no official SDK, just requests. For the API key, it checks the api_key input first, then falls back to the ANTHROPIC_API_KEY environment variable. An empty key doesn't break this node; it only bites at run time with an "API key not set" message.
The inputs that matter
- model - a dropdown with five Claude options. Default
claude-sonnet-4-6is the sensible mid-range pick;claude-haiku-4-5is what you reach for when you're testing workflows and don't want to burn money. - temperature - 0 to 1.0, default 0.7. Note the cap: Anthropic's API tops Claude at 1.0, so unlike the OpenAI/Gemini configs here you don't get the 0–2 range. For reliable output, stay under 0.5.
- max_tokens - 1 to 16384, default 2000. This bounds the reply length; Claude counts tokens generously, so bump it for long outputs.
- api_key (optional) - leave it blank and use
ANTHROPIC_API_KEYinstead; keeping keys in the workflow file is how they leak when you share it.
Output: a single LLM_CONFIG, which feeds into Simple LLM Agent or Simple LLM: Agent with Rules.
Installing the pack
# ComfyUI Manager → Install via Git URL:
https://github.com/NakamuraShippo/ComfyUI-NS-Util
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/NakamuraShippo/ComfyUI-NS-Util
pip install pyyaml watchdog
Restart ComfyUI. No model downloads - this is a cloud provider, and the pack's requirements (pyyaml, watchdog, opencv-python) are trivial. ComfyUI 0.3+ recommended.
Common issues
"Error: Anthropic API key not set" at run time is the classic one - set ANTHROPIC_API_KEY in your environment or fill the api_key input. If requests time out, check that the machine running ComfyUI can actually reach the internet, and remember Anthropic endpoints can be slow on first call. Finally, if your outputs look flat, you're probably fighting the temperature cap: Claude at 0.7 is more restrained than a 0.7 GPT, so nudge it up within the 0–1 range.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | claude-sonnet-4-6 | 5 options: claude-sonnet-4-6, claude-haiku-4-5-20251001, claude-opus-4-6, claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022 |
| temperature | FLOAT | 0.70–1 | — |
| max_tokens | INT | 20001–16384 | — |
| api_keyopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LLM_CONFIG | LLM_CONFIG | — |