Ideogram 4 Prompt Builder KJ
Draw your prompt for Ideogram 4's JSON format
- image
- bboxes
- prompt
- preview
- bboxes
- width
- height
When Ideogram 4 released its open weights in mid-2026, it came with a catch: it wants prompts in a structured JSON format, not the plain sentence you'd type into any other model. Writing that JSON by hand - regions, bounding boxes, text elements, color palettes - is miserable. Ideogram4PromptBuilderKJ is the node the community reached for within about a day of the model landing. It gives you a visual canvas where you draw the regions of your image, set what goes in each, and it assembles the correct JSON caption for you. It's a GUI for a format that was clearly designed for machines.
Why it exists
Ideogram 4's standout is text rendering and precise layout - putting words and objects exactly where you want them. To do that it consumes a structured caption describing regions on a normalized grid rather than a free-form prompt. This builder lets you lay those regions out visually: drag on the canvas to draw a box, tell it whether that box is an object or text, describe it, and the node handles converting your layout into the [ymin, xmin, ymax, xmax] coordinates on the 0-1000 grid the model expects.
The inputs and the canvas
The real interface is the on-node canvas, described in detail in the node's own tooltip: drag to draw a region, click to select, double-click to edit its description, right-click for a region list you can reorder (top = front). You can set each region's type, text, and color palette, drop in color swatches, and even use the last generated image as a live background to trace over.
The widget inputs back that up:
- width / height - the canvas aspect ratio, and the dimensions carried into the output.
- high_level_description - the overall scene description.
- background - the background prompt.
- style, plus aesthetics, lighting, and medium - the optional style fields that flesh out the look.
- bg_brightness - how bright the traced background shows on the canvas (a display aid, not part of the image).
- output_format, coord_mode, bbox_order - control how the assembled JSON is written (compact vs not, normalized coordinates,
yxordering).
There are optional inputs for an image to use as the canvas background, an import_json to load an existing caption back in, and bboxes. The outputs are the assembled prompt string (the JSON you feed the model), a preview image, the bboxes, and the width/height.
Installing KJNodes
In ComfyUI Manager, search "KJNodes for ComfyUI" in the Custom Nodes Manager, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt (portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-KJNodes\requirements.txt), restart. The builder node itself needs nothing extra - but you'll separately need the Ideogram 4 model weights set up in your ComfyUI to actually generate.
Worth knowing
There's a bonus reason to use the JSON format that has nothing to do with layout: Ideogram 4 ships with a safety filter trained into the weights, and prompting through the structured schema - the format the vendor told you to use in the first place - is the community's noted way around a lot of its refusals. So the builder isn't just convenience; the format it produces is the one the model behaves best on.
The main friction is the canvas learning curve. It's a real little editor with its own drag/click/modifier vocabulary, so read the tooltip before you fight it. And the coordinate output only means something to Ideogram 4 - this is a purpose-built node for one model's prompt format, not a general prompt tool, so don't wire its JSON into an unrelated model and expect sense.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 102464–16384 | Canvas aspect width (also the pixel grid the bbox is measured in). Ideogram 4 needs multiples of 16. |
| height | INT | 102464–16384 | Canvas aspect height (also the pixel grid the bbox is measured in). Ideogram 4 needs multiples of 16. |
| high_level_description | STRING | Optional one-line overview of the whole image (blank = omitted). | |
| background | STRING | Required scene background description. | |
| style | COMBO | 3 options: [object Object], [object Object], [object Object] | |
| aesthetics | STRING | Style descriptor (blank = omitted). | |
| lighting | STRING | Style descriptor (blank = omitted). | |
| medium | STRING | Style descriptor (blank = omitted). | |
| style_palette_data | STRING | Serialized style color palette from the editor (managed by the node UI). | |
| elements_data | STRING | Serialized regions from the editor (managed by the node UI). | |
| bg_brightness | INT | 250–100 | Background image brightness % (managed by the node UI slider). |
| import_mode | COMBO | when empty | How a wired import_json is used: 'when empty' only seeds the editor while it has no regions (then the editor wins, so you can edit); 'always' makes the wired JSON authoritative so its changes always propagate to the output. |
| output_format | STRING | compact | Output JSON formatting (set via the editor toolbar): 'compact' (default, what Ideogram 4 expects) or 'pretty' (indented, for readability). |
| coord_mode | STRING | normalized | bbox coordinate space (set via the editor toolbar): 'normalized' (default, the 0-1000 grid Ideogram 4 expects) or 'absolute' (pixels, scaled by width/height — NON-STANDARD for Ideogram, for other tools that want pixel coords). |
| bbox_order | STRING | yx | bbox axis order (set via the editor toolbar): 'yx' (default, Ideogram's [ymin,xmin,ymax,xmax]) or 'xy' ([xmin,ymin,xmax,ymax], the standard x1,y1,x2,y2 that Qwen-VL and most detectors use). |
| imageopt | IMAGE | Optional reference image shown as the editor background (and behind the preview). | |
| import_jsonopt | STRING | Optional: a full caption JSON. When connected, it loads into the editor and drives the output per 'import_mode'. | |
| bboxesopt | BOUNDING_BOX | [object Object] | Optional pixel-space boxes ({x, y, width, height}) used to seed the editor's regions when it has none. Ignored once regions exist. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| preview | IMAGE | — |
| bboxes | BOUNDING_BOX | — |
| width | INT | — |
| height | INT | — |