ToAPIs GPT Image 2 VIP
GPT Image 2 in your graph, with the weird-aspect-ratio problem patched out
- image_1
- images
- response
GPT Image 2 dropped in April 2026 with two reputations: genuinely good at text rendering and multi-panel consistency, and stubborn about aspect ratios. That second complaint - "how much of a competitor is it, if it still will only do weird aspect ratios?" - is the hole this node plugs.
What it is
This is a cloud-call node. No model loads, no VRAM, no checkpoint. It packages your prompt (plus up to ten optional reference images), fires it at a ToAPIs endpoint running the gpt-image-2-vip mirror of GPT Image 2, and drops the results into your graph as ordinary IMAGE data - text-to-image, or up to ten-way reference image-to-image.
You reach for it for the reason anyone reaches for an API node: the model has no open weights, so local isn't an option at any VRAM. The community's take was "viable Nano Banana competitor" plus "not open source, no interest" - fair, but the text rendering is real, and this gets it into a graph that already has your local upscales.
One honest caveat. This is a reseller route, not OpenAI direct, and the pack - 27 Chinese-authored utility nodes - has essentially no Reddit footprint. The source is readable, but the warning stands: an API node holds your key and phones home by design - exactly the shape of the one custom node that got weaponized in this ecosystem.
How it works
Under the hood it's an HTTP client. It POSTs to /v1/images/generations, gets back a task id - the interface is asynchronous - then polls on poll_interval until the status flips to completed and downloads the result URLs into tensors. Rate limits back off via Retry-After, and transient 5xx responses during polling are tolerated rather than fatal.
Reference images are the interesting part. The endpoint only accepts public http(s) URLs - no base64 - so a local IMAGE gets encoded to PNG and uploaded first, via multipart/form-data to /v1/uploads/images, purely to buy a URL the generator can fetch. PNG goes first to keep alpha; past the API's 10MB cap it silently falls back to JPEG, which flattens transparency. Your references leave the machine twice over.
IS_CHANGED returns the current time, so caching is deliberately off: every queue is a real, billed API call even if you changed nothing.
The inputs that actually matter
api_keyandapi_base. Leave the key blank and the node readsTOAPIS_API_KEYfrom the environment instead. Keepapi_baseathttps://toapis.com; mainland China users switch tohttps://toapis.cn. A wrong base is the classic 404 here.prompt. Up to 32,000 characters. The default is a Chinese placeholder ("a red circle on a white background") - replace it before you queue and wonder why you got a test image.size,custom_size,resolution.sizecovers every preset ratio plusauto; for anything else - 7:4, 1:3 - fillcustom_size, which overrides the preset and is capped at a 3:1 ratio. (The21:9and9:21presets are exempt - vendor presets, not custom ratios.)resolution(1k/2k/4k) decides actual pixels; 4k tops out at 3840 on the long side.quality,background,n, and the polling pairtimeout/poll_interval.lowdrafts cheap,mediumis the sane default,highis for finals.autosends no background parameter at all;transparentonly pays off if the result stays lossless on the way back. And don't setpoll_intervalabovetimeout, or you'll time out before the first poll.image_1(and friends). Connect it and a second port appears, up to ten.
Outputs are images (a list of IMAGE - downstream nodes just run once per image) and response, a JSON string with the task id, resolved settings and result URLs. It's not a terminal node, so wire images into a SaveImage or PreviewImage.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/LaoMaoBoss/ComfyUI-WBLESS.git
Restart ComfyUI, or search ComfyUI-WBLESS in ComfyUI Manager. There's no requirements.txt - the pack vendors its own cozy_comfyui and volcengine libs and falls back to stdlib logging if loguru is missing, so portable builds won't choke. Keep the key in the environment rather than the field:
export TOAPIS_API_KEY=sk-...
That matters when you share workflows - a node field travels with the .json.
When it breaks
The node translates HTTP failures into readable messages. 401 is a bad or missing key, 402 an empty balance, 403 an account that can't touch the model, 404 almost always a wrong api_base for your region, 413 a reference image past 10MB - and if that image had alpha, the JPEG fallback already ate it.
If a reference image seems ignored, check the console: the node warns explicitly when an input was wired but dropped before reaching the backend. If a transparent job comes back opaque, it's the same 10MB JPEG downgrade - shrink the reference first.
And for 4k + high jobs, raise timeout rather than debugging: the error is a timeout, not a bug.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | ToAPIs Bearer Token。留空时自动读取环境变量 TOAPIS_API_KEY。 | |
| api_base | STRING | https://toapis.com | ToAPIs Base URL。中国大陆用户请使用 https://toapis.cn。 |
| prompt | STRING | 白色背景上的红色圆形,简洁测试图 | 图像生成的文本描述,最长 32000 字符。 |
| model | COMBO | gpt-image-2-vip | 图像生成模型名称,本节点固定为 gpt-image-2-vip。 |
| size | COMBO | 1:1 | 输出图像比例。preset 覆盖全部常用宽高比;需要 7:4 这类任意比例时改用 custom_size。 |
| custom_size | STRING | 任意 宽:高 比例,非空时覆盖上方预设。宽高比最大 3:1,实际像素由 resolution 推导。 | |
| resolution | COMBO | 1k | 输出分辨率档位:1k / 2k / 4k(4K 长边最长 3840 像素)。 |
| quality | COMBO | medium | 图片质量:low 快速省钱、medium 平衡、high 最高精度。 |
| background | COMBO | auto | 背景样式。transparent 建议搭配 PNG 使用;auto 时不向上游发送该参数。 |
| n | INT | 11–10 | 生成图像数量。 |
| timeout | INT | 60030–3600 | 轮询任务结果的总超时时间(秒)。 |
| poll_interval | INT | 51–60 | 轮询任务结果的间隔(秒)。 |
| image_1opt | IMAGE | 参考图 1。连上后会自动追加下一个端口,最多 10 张。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| response | STRING | — |