Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Tuzi GPT-Image API 🐰
ComfyUI Node

πŸ€– Leon Tuzi GPT-Image API 🐰

GPT-Image models, by the call, through a Tuzi key

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Tuzi GPT-Image API 🐰
  • input_images_array
  • image
  • image_url
  • seed
β—„promptA cute cat.β–Ί
β—„modelgpt-image-2β–Ί
β—„sizeautoβ–Ί
β—„seed0β–Ί
β—„api_keyYOUR_API_KEY_HEREβ–Ί
β—„response_formaturlβ–Ί

OpenAI's GPT-image models - the ones that went viral for text rendering and then kept getting better through 1.5 and the current 2.x generation - are as closed as it gets, and the only way to get them into ComfyUI is an API wrapper. This one is the pack's GPT-Image route, but with a twist worth understanding before you buy in: it's not hitting OpenAI directly. Leon_Tuzi_GPT_Image_API_Node posts to https://api.tu-zi.com/v1/images/generations, a third-party reseller-style endpoint (Tuzi), using a Tuzi key. That's a different trust model than the pack's other nodes - your prompts and your money travel through one more middleman, and in exchange you get per-call access to models like gpt-image-2, gpt-image-1.5, gpt-image-1, gpt-4o-image, and gpt-4o-image-vip without an OpenAI business account.

If you have direct OpenAI API access, you'd want an official OpenAI node instead. This one is for the person who wants GPT-image quality per-call, billed flexibly, through an aggregator account they already have.

How it works

The node uses the same HyprLabImageGenerationNodeBase helper as the pack's other image nodes, but points it at Tuzi's endpoint rather than HyprLab's, with the API URL hardcoded - there's no api_url field to change. The payload is the standard OpenAI shape: model, prompt, size, response_format, n: 1, plus an image field if you attach references via the optional input_images_array (through the pack's Image Array Builder).

Inputs that matter

  • model - five choices: gpt-image-2 (default), gpt-image-1.5, gpt-image-1, gpt-4o-image-vip, gpt-4o-image. The generations are the story here; each tier costs differently, so check what your Tuzi plan prices before committing to a workflow default.
  • size - eight options from auto and 1024x1024 up to 4K-class 3840x2160 and 2160x3840. auto lets the model pick; the big ones are expensive and slow but genuinely useful for print-style output.
  • input_images_array - optional multi-image reference for editing-style generations.

Outputs: image, image_url, seed - the pack standard, with the image always returned as PNG here (the node hardcodes output_format="png" when it calls the base).

Installing

Same pack as every Leon node - ComfyUI Manager (search Leon) or clone:

cd ComfyUI/custom_nodes/
git clone https://github.com/l3ony2k/comfyui-leon-nodes comfyui-leon-nodes
pip install -r requirements.txt

Restart, and paste a Tuzi API key - not your HyprLab key; the tooltip is explicit that this node wants a Tuzi key.

Common issues

The #1 beginner fail is the key: users drop a HyprLab or OpenAI key into api_key and stare at a 401. It needs the Tuzi key. Next, size expectations: 3840x2160 on a plan that only serves lower tiers 4xxes, and the console shows the exact body. And keep the metered-call discipline - GPT-image generations are billed per image and the big sizes are real money, so validate your prompt at 1024x1024 first and save 3840x2160 for the shot you're keeping.

CategoryLeon_API

Inputs (7)

NameTypeDefaultDescription
promptSTRINGA cute cat.Text description of the desired image.
modelCOMBOgpt-image-25 options: gpt-image-2, gpt-image-1.5, gpt-image-1, gpt-4o-image-vip, gpt-4o-image
sizeCOMBOautoSize of the generated image
seedINT00–18446744073709550000Random seed for reproducible results
api_keySTRINGYOUR_API_KEY_HEREYour Tuzi API key
response_formatCOMBOurlFormat for returning the generated image. Must be either url or b64_json.
input_images_arrayoptIMAGE_ARRAYOptional multiple input images. Connect Image Array Builder node output here.

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
image_urlSTRINGβ€”
seedINTβ€”