Nodes/SpicyAPI/Z-Image · Text to Image
ComfyUI Node

Z-Image · Text to Image

A penny a picture, and the cheapest good frame in the graph

By spicyapi-ai·Created 21 days ago·Updated 2 days ago· 2
Z-Image · Text to Image
    • images
    • task id
    ◄prompt►
    ◄aspect_ratio1:1►
    ◄enable_prompt_expansionfalse►
    ◄output_formatpng►
    ◄seed0►

    Z-Image is Alibaba Tongyi-MAI's 6B model, and it's the reason a lot of people stopped caring about 12B checkpoints: Apache 2.0, genuinely uncensored, and good enough for photorealism without a 30-second wait per image. This node is the plain hosted version - prompt in, lossless PNG out, five aspect ratios, prompts up to 1,000 characters, from $0.01 an image.

    Why keep it in your graph

    Because it's a penny. As the draft stage of a bigger pipeline, it's hard to beat: generate twenty compositions cheaply, pick the one with real bones, then take it into a slower local model, a LoRA workflow, or an image-to-video node. It's also the simplest "is my prompt any good" tester in ComfyUI - no model to load, no VRAM to free, no 240-second queue behind someone else's batch.

    Where it isn't the right tool: precise camera angles, styled in-image text, or complex multi-element scenes. That's the model's documented weak spot, and it's why the local community routes that work to Flux 2 Dev or Qwen-Image. The 8-step distillation also means slightly less refinement than the non-distilled Base variants - that's the trade and it's a fair one.

    The inputs

    • prompt - subject, composition, style, lighting. Up to 1,000 characters, which is more than you'll need.
    • aspect_ratio - 1:1 by default; the model's five ratios cover portrait, landscape and square work.
    • enable_prompt_expansion - off by default, and there's a pricing wrinkle: requests with it on are billed at the prompt-expansion rate, a bit over half again as much. It's a rewriter, so it helps vague prompts and obscures deliberate ones. Know which you're doing.
    • output_format - this node delivers PNG only, per the endpoint's schema. If you need JPEG or WebP output, the LoRA and Spicy variants offer those.
    • seed - same seed, same picture.

    Outputs: images (standard IMAGE, wire it to Save Image or onward) and task id (STRING, the SpicyAPI task id for the console or support).

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/spicyapi-ai/comfyui-spicyapi
    

    Or search SpicyAPI in ComfyUI Manager. Restart ComfyUI, then Settings > SpicyAPI → paste a key from spicyapi.ai/console/keys, and restart once more; the node list is rebuilt from your account's catalogue at startup. On a server, SPICY_API_KEY. Nothing to install beyond the pack - no weights, no dependencies (an empty dependency list; it uses libraries ComfyUI already ships). Python 3.10+ and the V3 node API, tested with ComfyUI 0.39.

    Habits

    Set Max cost per run even here. A penny an image is cheap per image and not cheap per thousand, and the pack's pre-flight quote is checked against your ceiling before anything is charged. Seeds start on fixed, so a re-queued identical graph reuses the cached result rather than buying a duplicate - switch control after generate to randomize when you want a fresh take. Cancelling a run stops your wait but not the server-side job, which is billed if it succeeds and recoverable from your console for two weeks.

    Standard failure modes: No SpicyAPI key is set, 40310 (verify your email address), 40004 (no deployment serves that combination - change the option the message names), or an error ending in request_id ... that support can look up. And one honest caveat that applies to every node in this pack: your prompt and inputs go to a third party, and this vendor has no community track record yet - nothing in the Reddit corpus mentions it. Start small.

    CategorySpicyAPI/Image/Alibaba

    Inputs (5)

    NameTypeDefaultDescription
    promptSTRINGDescribe the image to generate: subject, composition, style, and lighting.
    aspect_ratioCOMBO1:1Aspect ratio of the generated image.
    enable_prompt_expansionBOOLEANfalseExpand the prompt into a fuller description before generating. Requests with it on are billed at the prompt-expansion rate.
    output_formatCOMBOpngFile format of the returned image.
    seedINT00–2147483647Same seed and settings, same result. Set 'control after generate' to randomize to get a new result on every run; every run is billed.

    Outputs (2)

    NameTypeDescription
    imagesIMAGE—
    task idSTRINGThe SpicyAPI task id, for the console logs or support.