Nodes/HOTCUT/HOTCUT API
ComfyUI Node

HOTCUT API

Your key, and the $ENV trick

By Smyshnikof·Created 3 months ago·Updated 3 months ago· 1
HOTCUT API
    • config
    api_key$ENV
    base_urlhttps://hotcut.ru

    The name is a lie, sort of. "HOTCUT API" sounds like the node that talks to an API, but HotcutConfig calls nothing on its own - it's the key-holder for the whole comfyui-hotcut pack. Every other HOTCUT node (GPT Image 2, GPT Image 2 Edit, Удалить фон) demands its config output before it will do a thing, so this is where every workflow in the pack begins. No key, no run: the moment a sibling node tries to use an empty credential, you get API-ключ пуст ("API key is empty").

    Its one job that isn't generation is the «Проверить баланс 🔥» button on the node body. Click it and a front-end extension POSTs to a local ComfyUI route (/hotcut/balance, same origin, so no CORS), which calls HOTCUT's GET /api/v1/me server-side and shows your remaining flames without queueing a single generation. Handy when you're eyeing a 103-flame 4K render and the balance is a mystery.

    Mechanically it's tiny. The build() function takes your two inputs and wraps them in a HOTCUT_CONFIG object that the graph passes around as a custom type. The one piece of real logic: if api_key is empty or literally $ENV, it falls back to the HOTCUT_API_KEY environment variable. That's the author's answer to a genuine ComfyUI footgun - paste a raw key into a node and it gets baked into your saved workflow.json, which then lives in git, gets exported for sharing, and leaks everywhere.

    Only two inputs exist, and you'll set one of them:

    • api_key - your hc_live_... key from hotcut.ru (Студия → API). Keep it as $ENV if you ever share workflows.
    • base_url - defaults to https://hotcut.ru. You will basically never touch this; it exists so the pack can be pointed at the service's address.

    Install is the same as the rest of the pack. Easiest: ComfyUI Manager → Custom Nodes Manager → search "HOTCUT" → Install → restart. Manual:

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

    Restart and the nodes land in the HOTCUT category. There are no models to download - the pack's entire dependency list is requests, Pillow and numpy, because nothing runs on your machine. That's the deal with API-wrapper packs: your GPU sits this one out.

    Where people get burned: the key is displayed exactly once when you create it, so copy it the first time. If you hardcode it instead of using $ENV, every workflow you export now carries your key. And because this is the credential-bearing node of a small, brand-new pack, do the five-minute audit the community has learned to do with API nodes: it's MIT and roughly 500 lines across two Python files, so skim nodes.py and hotcut_client.py before your first run. This category has been weaponized once already; a codebase this small is the easiest kind to check.

    One heads-up: the whole pack is in Russian - the menu, the button, the error strings. It doesn't get in the way. Key, base_url, done.

    CategoryHOTCUT

    Inputs (2)

    NameTypeDefaultDescription
    api_keySTRING$ENV
    base_urlSTRINGhttps://hotcut.ru

    Outputs (1)

    NameTypeDescription
    configHOTCUT_CONFIG