Claude Sonnet 4.5
The Workhorse You Should Probably Start With
- text
- raw_json
- credits_consumed
- usage_json
- credits_left
If you only ever install one LLM node from this pack, make it a Sonnet. The Sonnet tier is the middle of Anthropic's lineup - the one you reach for when Haiku isn't smart enough and Opus is overkill for the job - and prompt writing in a Comfy graph is exactly that job. It's also the tier you'll find in every other multi-provider Comfy node pack, which tells you what people actually run.
Where it fits
The LLM node is not the model that conditions your sampler. It sits before generation and writes the text your encoder consumes: a rough idea becomes a structured prompt, a shot list becomes six prompts that share lighting and wardrobe, a wall of tags becomes a paragraph your Flux/Z-Image/Klein encoder can use. The KB's llm-in-comfyui.md is the doc that makes the inside-the-checkpoint / inside-the-graph distinction stick.
Wire its text output into a CLIPTextEncode, another KIE model's prompt socket, or a Suno prompt field. That's the whole integration.
The reason to use KIE for it rather than a local model is price and convenience, in that order. KIE is a marketplace reseller: one node-pack author measured their Nano Banana Pro at roughly $0.09–0.12 per image versus $0.15–0.30 through Comfy's own Partner Node, and described putting $10 in and getting a lot of content out of it. The trade you're making is the standard one - metered per call, censored at the provider, prompt leaves the machine. A local abliterated 8B is free per call and won't refuse; it's also not a Sonnet.
How it works
The pack generates this node at startup from KIE's published Claude API docs. It assembles an Anthropic-shaped body - model, messages, stream, max_tokens - with optional system, tools and thinkingFlag, and posts it to /claude/v1/messages. Authenticated requests are locked to KIE-owned hosts, so nothing can redirect your key.
The mechanics that decide your day:
history_jsonis themessagesarray. It's parsed from JSON and passed through unchanged, then yourpromptis appended as the last user turn. Use it for genuine prior turns - not as a second copy of the current question.thinkingbecomesthinkingFlag: truein the request body. That's KIE's field name, not Anthropic'sthinkingobject with a token budget. If the documented raw shape matters,expert_override_jsonmerges into the body last and wins.
Inputs and outputs
Required: prompt. The optional ones worth your attention: system_prompt (your output contract - "return only the prompt"), max_tokens (default 4096, up to 131072; truncation shows up here first), thinking. The rest - stream, tools_json, expert_override_json - you can ignore until something breaks. stream is a transport flag, not a live typing effect; the node still hands you finished text.
Outputs: text downstream, raw_json when you need to see what the provider actually returned, usage_json for tokens, and credits_consumed / credits_left floats. A credits receipt is stamped on the node after each successful run - watch it the first few times so the cost per call stops being abstract.
Claude nodes in this pack have no IMAGE input. Multimodal bodies go through history_json or expert_override_json, with the image uploaded first via KIE • Upload Image.
Install
ComfyUI Manager → search ComfyUI-KIE-Nodes-Next. The README treats Registry publication as prepared but not shipped, so keep the manual path:
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 - paste the key once, wait for CONNECTED. KIE_API_KEY in the environment takes priority. Python 3.10+; no model downloads, no GPU work.
Common issues
Fresh install and the node isn't there. The model library is built from KIE's docs index on first startup and the frontend reloads once during the first deep sync. Restart and give it a moment.
Multi-turn doesn't behave. Ninety percent of the time it's a malformed history_json - it must be a JSON array of message objects. A string, or a single object, fails before anything is sent.
Prompt got longer and sloppier. The classic enhancer failure: it invents detail you never asked for. Narrow the brief in system_prompt and chain steps instead of trusting one open-ended rewrite.
Failed calls still cost you time, not money. Task submissions that KIE rejects don't bill; the pack's release notes are explicit about not repeating or charging for failed tasks. Retries on 429/5xx are automatic (4 by default).
It's a small pack with almost no community record. Search the corpus for this pack and you get zero hits - the Kie.ai node conversation belongs to a different project. The credential handling here is unusually careful for the category, but nobody has vetted it on your behalf. Read it before you give it a key.
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 | — |