Nodes/KIE.ai Nodes Next/KIE • Credits
ComfyUI Node

KIE • Credits

The Free Sanity Check Before You Spend Anything

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
KIE • Credits
  • config
  • credits

Every node in this pack that generates something is metered. Video jobs especially: the KB's read on API nodes is that per-call cost is where these workflows stop being free money, and that the expensive part is always the render, not the prompt. So you want a way to see your balance that doesn't involve generating anything. That's this node.

What it is

No required inputs, one optional config input, one output: credits as a float. It calls KIE's balance endpoint and hands you the number. That's it - no media, no task, no submission, nothing billable.

You'll use it three ways:

  • Sanity check after installing. Run it once in an empty graph. A number means your key works and you have funds. An error means one of those two is false, and the error text will tell you which.
  • A spend marker in a long session. Park it next to your generation cluster and re-queue the whole graph between batches; the number on the node is your running total without opening a billing page.
  • A guard you read by hand. ComfyUI has no built-in "stop if under N credits" logic, so practically it's a human check - glance at the node output before you launch the 4K batch.

How it works

The node builds a client and asks for the remaining balance. The client hits the documented KIE Common API endpoint, requires a numeric balance in the response, and raises a clear error if it doesn't get one. If a config is wired in, it uses that; otherwise it resolves the key saved in ComfyUI Settings, with KIE_API_KEY taking priority - same resolution path as everything else in the pack.

The pack also refreshes the balance after each successful generation and stores it, which is what feeds the last_credits field on KIE • Connection Status. So the two nodes read from related places: this one is a live call, that one reports local state.

The per-node receipt is a different thing

Worth knowing, because it's easy to confuse: since v0.4.16, every generation and Studio node shows a "credits spent / credits left" receipt on the node face after a run, and exposes credits_consumed and credits_left sockets. Those are per-task accounting - the spend for that call, plus the live balance. This node is the account-level query with no task attached.

If the balance service is briefly unavailable, generation still completes and the node reports the balance as unavailable rather than failing the job - the pack is careful not to let a monitoring call kill a paid render.

Inputs and outputs

Optional config of type KIE_CONFIG - only relevant if you're using the advanced connection override, which normal installs don't need. Output is credits, a FLOAT.

Wiring it somewhere? It's a float, so any node that takes a numeric input can consume it for logging or a comparison. There's no bundled "abort if low" node, so the honest answer is that this output is mostly for your eyes.

Install

ComfyUI Manager → ComfyUI-KIE-Nodes-Next. The README has Registry publication as prepared rather than 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 to save the key once. This node is registered from the pack's base mappings, so it's available immediately - unlike the model nodes, it doesn't wait for the live catalog sync. Python 3.10+, no GPU.

Common issues

Error: no API key configured. Fix it in Settings, or check whether KIE_API_KEY is set in the environment your ComfyUI process inherited. KIE • Connection Status will tell you which source is winning.

It errors while your generations work fine. The balance endpoint is a separate service. If KIE's balance service is having a moment, the query can fail even though tasks submit normally - retry before you conclude your account is broken.

The number looks wrong after a batch. It's live, not cached, so it should be right. If it disagrees with what you expected to spend, remember that failed tasks don't bill - and that old-style over-spending is usually a loop you left running.

Why bother, when Comfy's own API nodes show pricing? Because the reason people are on KIE at all is price. One community node author measured KIE's Nano Banana Pro at roughly $0.09–0.12/image against $0.15–0.30 through the native node, and described throwing $10 at KIE and generating a lot with it. If you're using a cheaper reseller specifically to control spend, checking the balance should be easy - and this is one node, zero cost, one number.

CategoryKIE Next/Utility

Inputs (1)

NameTypeDefaultDescription
configoptKIE_CONFIG—

Outputs (1)

NameTypeDescription
creditsFLOAT—