Nodes/KIE.ai Nodes Next/Claude Haiku 4.5
ComfyUI Node

Claude Haiku 4.5

Claude Haiku 4.5 in ComfyUI Is the Node You'll Actually Leave Running

By felipederosilva·Created 2 months ago·Updated 2 days ago· 3
Claude Haiku 4.5
    • text
    • raw_json
    • credits_consumed
    • usage_json
    • credits_left
    ◄prompt►
    ◄system_prompt►
    ◄streamfalse►
    ◄tools_json[]►
    ◄history_json[]►
    ◄max_tokens4096►
    ◄thinkingfalse►
    ◄expert_override_json{}►

    The Haiku tier exists for one reason: you're going to run the same prompt-shaping job hundreds of times, and paying Opus prices to turn "girl on a rooftop, neon" into a well-formed scene description is a waste of money. If you want one LLM node in your graph that stays there after you're done experimenting, it's usually this one.

    What it does in a graph

    An LLM node in ComfyUI isn't a text encoder. It sits upstream of generation and writes the string your encoder conditions on - the distinction the KB spells out in llm-in-comfyui.md. Haiku 4.5 costs a fraction of the big models on the same provider, so the jobs it's right for are the boring, repeated ones:

    • Rewriting a lazy one-liner into a structured prompt for Flux/Z-Image/Klein.
    • Expanding tags into natural language (or vice versa) in bulk.
    • Turning a shot list into six separate prompt strings you re-run every iteration.

    For the genuinely hard one-shot prompt - a tangled multi-constraint brief - you want an Opus node and you'll pay for it. For the loop you run 40 times a night, Haiku is the sane default.

    How it works

    The pack generates this node at startup from KIE's published Claude API page, so it's a thin, opinionated wrapper: it builds an Anthropic-style body (model, messages, stream, max_tokens, optional system, tools, thinkingFlag) and POSTs it to /claude/v1/messages on api.kie.ai. Your key stays on KIE's domain - the client refuses to send authenticated raw requests anywhere else.

    The two mechanisms that catch people:

    history_json is the messages array, passed through as-is. Your prompt gets appended afterwards as the final user turn. So don't put the current question in both places, and don't paste a JSON string where a JSON array is expected - it's parsed with json.loads and a malformed value fails the run before anything is sent.

    thinking becomes thinkingFlag in the request. If you're used to Anthropic's own thinking object with a token budget, this toggle isn't that; use expert_override_json if you need the raw documented field.

    Inputs and outputs

    prompt is the only required input. Beyond it: system_prompt, which is where "output only the prompt, no preamble" belongs - every chat model's habit is to wrap the answer in politeness, and that lands in your conditioning if you let it. max_tokens defaults to 4096 (ceiling 131072). thinking is off by default; leave it there for this job. tools_json and expert_override_json are the deep end.

    Outputs are text (wire it into a CLIPTextEncode or a video model's prompt socket), plus raw_json, usage_json, credits_consumed and credits_left. The node paints a credits receipt on itself each run, which is the fastest way to notice a loop that's eating your balance.

    There is no IMAGE input on any Claude node in this pack - richer multimodal bodies go through history_json or expert_override_json.

    Install

    ComfyUI Manager, search ComfyUI-KIE-Nodes-Next. The README lists Registry publishing as prepared-but-not-shipped, so if Manager doesn't find it:

    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, confirm the CONNECTED row. KIE_API_KEY in the environment wins over the saved key. No models to download; the only requirement is Python 3.10+.

    Common issues

    Nothing appears in the menu. The whole model library is built from KIE's live docs index on first startup, which can take a moment and reloads the frontend once. Restart once before assuming the node is missing.

    thinking on = slower, dearer, no better output. Reasoning toggles don't help a formatting job and they raise the chance of scratch-work leaking into the prompt. The KB is blunt about this: the job selects for small and obedient.

    "No KIE API key configured." That's the client telling you it resolved neither the saved key nor the env var. Fix it in Settings rather than hardcoding a key in a node - the design deliberately keeps the full key out of workflow JSON.

    Rate limits are a real thing at Haiku volumes. The pack retries 429/5xx with backoff (default 4 retries, tunable through the advanced config node), but a hundred-call batch will still crawl.

    The content policy is the provider's. KIE is a reseller, so you're reaching Anthropic's model through it - a refusal is the model's refusal, and the "looser filtering" some resellers advertise doesn't change that. For anything hosted providers won't write, a local uncensored LLM is the actual answer.

    CategoryKIE Next/LLM/Claude/Haiku

    Inputs (8)

    NameTypeDefaultDescription
    promptSTRINGUser prompt / message.
    system_promptoptSTRING—
    streamoptBOOLEANfalse—
    tools_jsonoptSTRING[]Optional function/tool definitions supported by this model endpoint.
    history_jsonoptSTRING[]Optional prior message/input array as JSON.
    max_tokensoptINT40961–131072—
    thinkingoptBOOLEANfalse—
    expert_override_jsonoptSTRING{}Expert-only request overrides. Normal use does not require this.

    Outputs (5)

    NameTypeDescription
    textSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    usage_jsonSTRING—
    credits_leftFLOAT—