Nodes/ComfyUI Labnana/Labnana Estimate Credits
ComfyUI Node

Labnana Estimate Credits

Check the price before you spend — a dry run that can't cost you a credit

By exoticknight·Created about a month ago·Updated 19 days ago· 0
Labnana Estimate Credits
  • client
  • reference_images
  • credits
  • can_generate
  • info_json
prompt
modelgemini-3-pro-image
image_size2K
aspect_ratio1:1
system_prompt
reference_image_urls

If you're using ComfyUI-Labnana for real work, this node is your anti-surprise-bill insurance. Labnana is a pay-per-credit image API - Google's Gemini image models, GPT Image 2, Seedream, the Wan family, all behind per-image credit prices that vary by model and resolution. LabnanaEstimateCredits answers one question before you commit: how much will this exact generation cost, and can I even run it? It's a dry run that returns a number and a thumbs-up without spending anything.

How it works

The node takes the same inputs as Labnana Image Generation - prompt, model, image_size, aspect_ratio, plus the optional system_prompt, reference_images, and reference_image_urls - and POSTs them to the estimate-credits endpoint. Because it's the same payload builder as the real generation node, what you're pricing is precisely what you'd generate. It also validates the combination locally: an invalid model/size/ratio pairing fails fast before any credits are involved, which is the same fail-fast validation the main node does.

The inputs that matter are the same three you'd set on the generator:

  • model - which of the six models (e.g. gemini-3-pro-image, gpt-image-2, seedream-5-0-pro) you're pricing.
  • image_size - 1K/2K/4K, and this is where most of the price difference lives. 4K on wan2.7-image or seedream-5-0-pro is invalid and errors here.
  • aspect_ratio - must be a ratio the chosen model supports.

It needs the client output from a Labnana API Client node, same as every other node in the pack.

Outputs:

  • credits (INT) - the live price in credits for this exact combination.
  • can_generate (BOOLEAN) - whether the request is valid and you have the credits.
  • info_json (STRING) - the full server response, including any warnings, pretty-printed.

Because the node is an output node, you can just run it on its own and read credits in the UI. For automation, wire can_generate into a gate: only let the generation node fire when it's true.

Install

Same as the rest of the pack - search Labnana in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/exoticknight/ComfyUI-Labnana.git

Restart ComfyUI. Only dependency is requests, and you need an API key (ls_...) in the client node or the LABNANA_API_KEY environment variable.

Gotchas

  • Prices change. The credit costs in the README (e.g. 15/15/30 credits for Gemini 3 Pro at 1K/2K/4K) follow the official docs and can move - this node always returns the current server-side price, so trust it over any table.
  • Warnings matter. If the server flags something (a soft constraint on your combo), it shows up in info_json and the console, not as a hard failure. Read them before you spend.
  • It's a preview, not a guarantee. The estimate reflects price and feasibility; the actual job can still fail later on moderation or a busy free tier.

The honest take: if you're doing a handful of generations a day, you'll probably skip this and just run the generator. Once you're pricing out 4K jobs or a batch pipeline, or you're on a fixed credit budget, make it a habit - a 30-second dry run beats discovering the bill afterward.

CategoryLabnana/Generate

Inputs (8)

NameTypeDefaultDescription
clientLABNANA_CLIENT
promptSTRINGGeneration or editing instructions.
modelCOMBOgemini-3-pro-image6 options: gemini-3-pro-image, gemini-3.1-flash-image, gpt-image-2, wan2.7-image-pro, wan2.7-image, seedream-5-0-pro
image_sizeCOMBO2K4K is unsupported on wan2.7-image / seedream-5-0-pro and on reference-guided wan2.7-image-pro requests.
aspect_ratioCOMBO1:1Supported ratios depend on the selected model; invalid combinations fail locally.
system_promptoptSTRINGOptional style/behavior instructions prepended to the prompt (the API has no native system-prompt field).
reference_imagesoptIMAGEBatch of reference images, sent inline as base64. Max count depends on model (4-14).
reference_image_urlsoptSTRINGOptional http(s):// or gs:// image URLs, one per line, sent as fileData references.

Outputs (3)

NameTypeDescription
creditsINT
can_generateBOOLEAN
info_jsonSTRING