Claude Sonnet 5
What to Do When the Node Is Newer Than Every Tutorial
- text
- raw_json
- credits_consumed
- usage_json
- credits_left
Search for "Claude Sonnet 5 ComfyUI" and you get nothing useful, which is the normal state of affairs for the newest model version in a fast-moving catalog. Here's the good news: the node is an interface, not a model, and the interface hasn't changed across the whole Claude family in this pack. Learn the six widgets on this node and you've learned all ten Claude nodes.
The node is a thin shell, and that's the point
Every Claude node in this pack is generated from KIE's published API documentation for that model version. Same required input (prompt), same optional set, same five outputs. What differs is the model string shipped in the request. So "which Sonnet version" is a question only your own outputs can answer - and answering it costs about a penny per test, which is a much better use of ten minutes than reading anyone's opinion, mine included.
The corpus has essentially no coverage of these point releases; there's a single thread mentioning "Claude Opus 5" and nothing for the Sonnet line. This is a node-and-vendor ecosystem, not a Reddit-thread one. Trust KIE's own docs page - each node's description links back to it, and the pack enriches each node from that page at startup.
What it's doing in your graph
Text in, text out, upstream of the sampler. You're using it to write prompts: rough idea → structured paragraph → CLIPTextEncode. Or to expand a shot list, or to turn a wall of booru tags into natural language for an LLM-encoded checkpoint. It is not a text encoder; it doesn't run on your GPU and doesn't condition the sampler directly. llm-in-comfyui.md covers why those two things get conflated and why the distinction decides how you debug.
How it works
At startup the pack indexes KIE's official API documentation, builds a node class per published model page, and posts an Anthropic-shaped body - model, messages, stream, max_tokens, optionally system, tools, thinkingFlag - to /claude/v1/messages. Authenticated raw requests are confined to KIE-owned hosts, so your key can't be redirected.
The two behaviours that reliably confuse newcomers: history_json is the messages array (parsed, passed through, with your prompt appended last as the current turn), and thinking maps to KIE's thinkingFlag field rather than Anthropic's budgeted thinking object.
Inputs and outputs
Required: prompt. Optional: system_prompt, stream, tools_json, history_json, max_tokens (4096 default, 131072 max), thinking, expert_override_json. Set system_prompt - the difference between a clean prompt and one with "Certainly! Here's a refined version:" glued to the front is entirely in there. Skip tools_json until you genuinely have a function schema to hand over.
Outputs: text (wire it downstream), raw_json (the full provider response, for when the text looks off), usage_json, plus credits_consumed and credits_left as floats. The node draws a spent/left receipt on itself after each run. No IMAGE socket exists on Claude nodes - multimodal has to go through history_json/expert_override_json, with images uploaded first via KIE • Upload Image.
Install
ComfyUI Manager, search ComfyUI-KIE-Nodes-Next - the README says Registry publication is prepared but not yet done, so if Manager returns nothing:
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
cd ComfyUI-KIE-Nodes-Next
pip install -r requirements.txt
Restart, then Settings → KIE.ai Nodes Next → Connection and paste your key once. It's validated against KIE before overwriting anything; afterwards the frontend only ever sees a masked fingerprint. KIE_API_KEY beats the saved key. Python 3.10+, nothing to download.
Common issues
Newest isn't there until the sync runs. The full catalog (167 model IDs and 241 operations in the current snapshot) comes from a live read of KIE's docs index, plus a bootstrap set that ships offline. The first deep sync reloads the frontend once; after that it re-checks at most every 24 hours.
A version that vanished. Catalogs move. When a model is pulled upstream, the node can still load and the call can still fail - the pack refreshes metadata, it can't resurrect an endpoint. Community reports of exactly this exist for other KIE models.
Empty or truncated text. max_tokens is the first suspect, always.
It costs credits per call, and you're iterating. Use credits_consumed and the on-node receipt to see the real rate. If you're reshaping prompts forty times an evening, that's the job a local model does for free - and it won't filter. The API node earns its keep on the hard, occasional brief.
Nothing about this pack is widely vetted. Corpus searches for it return zero threads; the Kie.ai node chatter out there is a different project. It's a credential-holding pack that calls the network by design, from the one category that has already shipped malware once. The key handling here is careful, but read it before you trust it, and don't reuse a key you care about.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | User prompt / message. | |
| system_promptopt | STRING | — | |
| streamopt | BOOLEAN | false | — |
| tools_jsonopt | STRING | [] | Optional function/tool definitions supported by this model endpoint. |
| history_jsonopt | STRING | [] | Optional prior message/input array as JSON. |
| max_tokensopt | INT | 40961–131072 | — |
| thinkingopt | BOOLEAN | false | — |
| expert_override_jsonopt | STRING | {} | Expert-only request overrides. Normal use does not require this. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| usage_json | STRING | — |
| credits_left | FLOAT | — |