Nodes/comfyui-budgetpixel/BudgetPixel Credits
ComfyUI Node

BudgetPixel Credits

Your balance check, without leaving the canvas

By budgetpixel-ai·Created about 17 hours ago·Updated about 12 hours ago· 3
BudgetPixel Credits
    • credits
    refreshtrue

    If you're running BudgetPixel's model nodes at all, this is the node you'll want sitting somewhere visible in every workflow. It's a dashboard widget: one refresh away from your live credit balance, printed as a string and to the ComfyUI console. No generation, no cost - just "how much runway do I have left."

    The answer comes from GET /v1/account/credits, and it's more useful than a bare number: the output string looks like Available: 1,240 credits (monthly 760/2000 used, extra 0), so you can see your plan's monthly limit and any extra credit packs separately from what's currently spendable.

    The one input

    refresh, a boolean, defaults to true. That's the entire input surface, and it does exactly what it says: with refresh on, the node re-fetches the balance on every run of the queue; flip it off and it returns the last fetched value. Under the hood that's implemented as an IS_CHANGED hook returning the current time - which is how the node forces ComfyUI to treat it as changed and actually re-run it rather than caching the result. Leave it on unless you're deliberately freezing a snapshot.

    The output credits is a plain STRING. It doesn't wire into samplers or conditionals; you read it, or use it for logging. That's the point - it's telemetry for a paid API, and the honest answer to "did that last 4K run hurt?"

    How it fits

    Use it as the bookend to BudgetPixel Cost Estimate: Estimate tells you what the next run costs, Credits tells you whether you can afford it. A common setup is an Estimate node per expensive branch plus one Credits node at the end of the workflow, so a queue of video jobs gives you a running tally you can sanity-check.

    Install

    Standard for this pack - ComfyUI Manager (search "BudgetPixel"), or clone and pip install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/budgetpixel-ai/comfyui-budgetpixel.git
    pip install -r comfyui-budgetpixel/requirements.txt
    

    Restart ComfyUI and set your key via BUDGETPIXEL_API_KEY or a budgetpixel.json file ({"api_key": "bpx_live_..."}) inside the pack folder. There's no local model, no GPU, no extra dependencies beyond the pack's single requests requirement.

    Gotchas

    This is where you'll first see key errors, because it's the cheapest node to run. A 401 means your key isn't set or is wrong; api_access_not_enabled means your plan doesn't include API access (the README notes the API is included in every paid plan); insufficient_credits means you're out of runway - and that's exactly the message you wanted to see here rather than mid-generation. One warning: the balance is fetched when the node runs, not when the workflow was built, so if you leave a workflow idle for a week the number in the canvas is a memory, not a promise.

    CategoryBudgetPixel/Account

    Inputs (1)

    NameTypeDefaultDescription
    refreshBOOLEANtrueRe-fetch on every run.

    Outputs (1)

    NameTypeDescription
    creditsSTRING