Local credit usage tracker for Comfy.org API nodes (stopgap until #13244) #15896
matokokles-rgb
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What it is
If you use several paid API nodes (Kling, Seedance, Gemini image, Veo...) in
the same ComfyUI session, it's easy to lose track of how many credits
you're burning through until you check Settings → Credits. I put together a
small local tool that runs alongside ComfyUI and shows a live table of
usage (date, model, credits spent, running balance) in its own desktop
window.
How it works
It has three data sources: your local ComfyUI run history (
/history, arough estimate based on a price table you fill in), manually logged
top-ups, and — most accurately — the same internal API the Credits page
itself uses (
api.comfy.org/customers/balanceand.../customers/events).The catch
That last one isn't an official API — there isn't one yet (see #13244,
which I'd love to see resolved properly). This tool just replays the same
request your browser already makes under your own session, using a token
you copy out of DevTools yourself. It's a stopgap, not a real solution —
happy to retire this the day there's an actual documented endpoint.
Code
https://github.com/matokokles-rgb/comfy-credit-tracker — MIT licensed, pure
Python standard library (no dependencies), Windows launcher included but
the two scripts run fine on any OS. Contributions welcome, especially
around automatic token refresh (currently the token expires after ~1 hour
and needs to be recopied manually) and non-Windows launcher scripts.
Figured others hitting the same "wait, where did my credits go" feeling
might find it useful, and that a working example might help make the case
for #13244.
All reactions