Nodes/ComfyUI-DMXAPI/DMXAPI GPT Image
ComfyUI Node

DMXAPI GPT Image

Nine model IDs, one node, and a 60-second guillotine

By mch000534·Created 2 months ago·Updated 11 days ago· 1
DMXAPI GPT Image
  • image
  • IMAGE
◄prompt►
◄modelgpt-image-2.5-flare►
◄api_key►
◄sizeauto►
◄batch_size1►
◄qualityauto►

The node is called DMXAPI GPT Image. Its class name is still DMXAPI_GPT_Image2. Both are true: the author renamed the display name when GPT Image 2.5 arrived and froze the internal ID so old workflows wouldn't break on load. Small thing, but it says this pack is maintained by someone who's been bitten by a rename before.

So: one node, nine model IDs, and a hard upstream timeout that shapes every advice you'll ever get about it.

What it is

This is how you get OpenAI's GPT Image models into a Comfy graph without Comfy's own credit system. It's a thin HTTP client pointed at DMXAPI, a Chinese aggregator that resells OpenAI, MiniMax and friends behind a single key and base URL. No weights, no VRAM, no local anything - the request goes out, the PNG comes back as a normal IMAGE tensor.

The KB's line on this whole category: API nodes are the right tool for a model you can't run and the wrong default for one you can. There's no GPT Image checkpoint to download, so this is one of the doors. What you pay is per-call billing, your prompt and reference images leaving the machine, and a filter you can't lift.

Against Comfy's own official API nodes - vetted, billed through Comfy - this is a third-party reseller: possibly cheaper, possibly reachable where the official route isn't, and carrying the trust cost of a pack off the registry. Make that trade knowingly.

How it works

Text-to-image goes to /v1/images/generations as JSON with model, prompt and n. Attach an image and the node switches to /v1/images/edits as a multipart upload - and it doesn't reuse the generation payload, because DMXAPI's generation endpoint rejects an image field with a 400 (Unknown parameter: 'image' - the author tested it). Your reference image is re-encoded as JPEG at quality 95, resized to a 2048 long side, and uploaded as a file field. Only the first frame of a batch is used; you'll get a console warning about the rest.

Response formats differ by model - 2.5 omits response_format on text-to-image, legacy 2.x sends b64_json, edits send neither - but the parser accepts b64_json or a URL either way, so you don't have to care.

Then there's the wall. DMXAPI's sync image endpoints get cut by the upstream gateway at roughly 60 seconds. The node sends 4K jobs with a 120-second client timeout anyway, and the author's note is that 3840x2160 reliably gets disconnected. Everything below is downstream of that one fact.

The nine models:

  • 2.5 sunburst - quality-first, plus -cdx and -ssvip suffixes
  • 2.5 flare - speed-first (the node's default), same two suffixes
  • legacy - gpt-image-2-03, gpt-image-2, gpt-image-2-ssvip

The README admits the two -ssvip IDs were user-confirmed rather than vendor-documented, and that suffix routing wasn't paid-smoke-tested against both endpoints for every combination. If a suffix 400s, drop back to the base ID.

The inputs that matter

  • prompt - required, non-empty.
  • model - the nine above. Default gpt-image-2.5-flare. Start with flare; sunburst is the one that runs long.
  • quality - auto, low, medium, high, xhigh, max. The author's own comment calls this the only knob that directly cuts generation time, and auto behaves like a fairly high setting. xhigh and max are 2.5-only, rejected locally before you spend anything if you pick a legacy model.
  • size - real pixels here: auto, 1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, 2160x3840. The node validates against DMXAPI's rules - long side ≤ 3840, both dimensions divisible by 16, aspect ≤ 3:1, 655,360–8,294,400 total pixels - and warns in the log above 4 megapixels, where the cutoff usually wins.
  • batch_size - 1 to 4, but per-model caps apply: gpt-image-2-03 allows 1, the two -cdx models allow 3. Ask for more and the node clamps it with a warning rather than erroring.
  • image (optional) - a reference image, first frame only.
  • api_key - or set OPENAI_API_KEY / DMXAPI_KEY in the environment.

One output: IMAGE.

Installing

Manager → search DMXAPI (it's on the Comfy Registry), or:

cd ComfyUI/custom_nodes
git clone https://github.com/mch000534/ComfyUI-DMXAPI
/path/to/ComfyUI/.venv/bin/python -m pip install -r ComfyUI-DMXAPI/requirements.txt

Restart ComfyUI afterward - it only scans custom_nodes/ at boot. No model downloads; this pack never loads weights. ffmpeg is optional and irrelevant to the image nodes.

Where people get burned

You will hit the 60-second cutoff eventually, and the fix is in this order: quality down to medium or low; switch to gpt-image-2.5-flare; pin size to something explicit like 1024x1024 instead of auto; shorten the prompt. The node prints that list itself when a job gets interrupted, which is more than most packs bother to do.

size: auto with a reference image is a trap. The output dimensions get chosen upstream, and a big reference tends to produce a big - slow - result. If you're feeding it a photo, specify the size.

Interrupted ≠ free. The author notes that a disconnect after the request is sent usually means the upstream took the job and is already generating. Retrying is how you discover a call was billed twice. Though also worth knowing: the pack does retry, because testing showed the same 2048x1152 job failing at 65 seconds and succeeding at 58 on the second try.

Five ways to have a 401. Check trailing whitespace in the key first, then check whether a system environment variable is shadowing your .env. The node field wins over DMXAPI_KEY, which wins over OPENAI_API_KEY - so a stale key typed into the node silently beats your environment. And .env is read once at import: edit it, restart ComfyUI, or just use the pack's SetAPIKey node.

CategoryDMXAPI/Image

Inputs (7)

NameTypeDefaultDescription
promptSTRING—
modelCOMBOgpt-image-2.5-flare9 options: gpt-image-2.5-sunburst, gpt-image-2.5-sunburst-cdx, gpt-image-2.5-sunburst-ssvip, gpt-image-2.5-flare, gpt-image-2.5-flare-cdx, gpt-image-2.5-flare-ssvip, +3
api_keySTRING—
sizeCOMBOauto10 options: auto, 1024x1024(1:1), 1536x1024(3:2), 1024x1536(2:3), 2048x2048(1:1), 2048x1152(16:9), +4
batch_sizeINT11–4—
qualityCOMBOauto6 options: auto, low, medium, high, xhigh, max
imageoptIMAGE—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—