๐ผ๏ธ GPT-Image-2 Text to Image
A prompt, a phone call, and GPT-Image-2 quality on a potato GPU
- image
- image_url
- request_id
The ๐ผ๏ธ GPT-Image-2 Text to Image node is a phone call wearing a ComfyUI costume. You type a prompt, it POSTs it to OpenAI's GPT-Image-2 through the muapi.ai API, waits, and downloads the finished image back into your graph as a normal IMAGE tensor. There's no checkpoint, no VAE, no sampler settings - because there are none. GPT-Image-2 is a closed model, and this node is the bridge that lets you use it without owning the GPU that runs it.
That's the whole pitch, and it's a real one for a specific crowd. The GPT Image line has been the quality ceiling for text rendering and natively multimodal generation since the 4o Ghibli moment in 2025 - the same closed access the community both praised and resented (the modidex KB tracks the "gamechanger?" reaction alongside the "everything trips its baby mode content filters" complaints). If you've got a low-spec machine or just want that model's look in your pipeline without renting A100s, a remote node like this is the only honest route. The tradeoffs are the ones every closed-API user swallows: it costs credits, it's remote, it has no seed control, and OpenAI can move the goalposts on content filtering whenever it likes. A file on your disk is permanent; an API is a favor.
How it actually works
The source is refreshingly short. On queue, the node builds {"prompt": prompt}, POSTs it to api.muapi.ai/api/v1/gpt-image-2-text-to-image with your key in the x-api-key header, and gets back a request_id. Then it polls GET /predictions/{request_id}/result every 5 seconds for up to 10 minutes, printing [GPTImage2] status lines to your console while it waits. When the status flips to completed, it downloads the CDN image, converts it to a float tensor, and returns. ComfyUI blocks on the node for the whole round-trip, so a generation is typically tens of seconds of staring at a grey canvas.
Inputs and outputs that matter
Three inputs, three outputs. The ones you set:
prompt(multiline STRING) - the actual image description. The default is a red fox in a snowy forest, and honestly that's a fine prompt to test your key with. GPT-Image-2 reads natural language well, so don't over-stuff it with LoRA-style keyword spam.seed(INT) - the pack's one piece of quiet cleverness. It's not sent to the API; GPT-Image-2 has no seed control. It exists purely to bust ComfyUI's cache - change it and the node re-runs instead of replaying the last result. Treat it as a "re-roll" button, because that's literally all it is.api_key(optional STRING) - wire it from the ๐ API Key node, or leave blank and let the pack read~/.muapi/config.json.
The outputs:
image(IMAGE) - the generated image as a tensor. Wire this into PreviewImage or SaveImage and you're done.image_url(STRING) - the CDN URL, if you want to log it or hand it to a text-display node.request_id(STRING) - the generation's ID, mostly useful for debugging against the muapi dashboard.
Install and the first-run reality check
Install via ComfyUI Manager (search the pack title or paste the Git URL), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Anil-matcha/gpt-image-2-comfyui
pip install -r gpt-image-2-comfyui/requirements.txt
The requirements are just requests, Pillow, numpy, and torch - you already have all of them. No model downloads, no weights folder, nothing heavy.
The thing that will actually trip you up on first run is money and auth, not install. Grab a key at muapi.ai โ Dashboard โ API Keys, then expect one of three errors until it's right: 401 means the key is wrong, 402 means insufficient credits (top up), 429 means rate-limited (wait). The errors are surfaced with those exact meanings, so at least you know what you're dealing with. If the poll times out after 10 minutes, the service is having a slow day - requeue it.
Worth knowing: because there's no seed and no resolution control, you don't get much fine-grained steering. Where people do get value out of this node in real workflows is as a storyboard generator - knock out a dense multi-shot plan in one prompt, then feed the frames downstream. That's the use that keeps getting posted, and it's a good one.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A photorealistic image of a red fox sitting in a snowy forest at dusk. | โ |
| seed | INT | 00โ18446744073709550000 | Not sent to the API โ GPT-Image-2 has no seed control. Changing this forces ComfyUI to re-run the node instead of reusing a cached result on repeat/batch generations. |
| api_keyopt | STRING | โ |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |
| image_url | STRING | โ |
| request_id | STRING | โ |