JSON Prompting
Use a structured JSON prompt with Ideogram 4.5 and 4.0 to control exact text, text placement, layout and hex colors.
Ideogram 4.5 and 4.0 accept a plain-language prompt or a structured JSON prompt. Both models use the same JSON format. Ideogram 4.0 was trained on captions in this format, so a JSON prompt speaks to the model in its own terms.
Plain language works well for most images. JSON adds control that plain language can't give you:
Color control. Up to 16 hex colors for the whole image and up to 5 for each element. They steer the colors strongly but don't lock every pixel.
Layout. Place any element in the frame with a bounding box.
Text placement. Each piece of text is its own element with its own position and style.
Repeatable results. Runs from the same JSON prompt keep close to the same layout.
When to use JSON
Quick ideas, exploring
Plain language
Expanding a short idea
Plain language with Magic Prompt
Posters, branded graphics, labels, signage
JSON
A set color palette
JSON
The same layout across many images
JSON
Photos where exact placement doesn't matter
Plain language
How Magic Prompt and JSON work together
You don't have to write JSON by hand. On Ideogram 4.5 and 4.0, Magic Prompt turns a plain-text prompt into a structured JSON prompt before generating:
Magic Prompt on: it rewrites and expands your idea, adding detail, style and layout, then builds the JSON.
Magic Prompt off: it keeps your wording and only converts it into the structured format.
You paste valid JSON: Ideogram uses your JSON as written and skips Magic Prompt, unless Magic Prompt is On. Then it rewrites your JSON too.
So when you've written JSON by hand and want it used exactly, turn Magic Prompt off.
If your JSON doesn't match the format below (for example, high_level_description is missing), Ideogram reads it as plain text. On Ideogram 4.5 the prompt box takes up to 10,000 characters, and very long JSON prompts can lose their last elements, so list the most important elements first.
The schema
A JSON prompt has three top-level fields:
high_level_description
Required
One or two sentences that sum up the whole image
style_description
Optional
Style, lighting, medium and color palette
compositional_deconstruction
Required
The background and every element in the image
high_level_description
If you could say only one thing about the image, say it here.
style_description
Every field is optional. Use photo for photographs, or art_style for illustration, painting, 3D, graphic design and the like. The model learned from captions that used one or the other, so pick one.
aesthetics
string
Mood and look, for example "moody, cinematic, desaturated"
lighting
string
For example "golden hour, rim light, dramatic shadows"
photo
string
Camera and lens, for example "35mm, f/1.4, bokeh". Use this or art_style, not both.
medium
string
Free text, for example "photograph", "illustration", "3D render", "painting", "graphic design"
art_style
string
For non-photo work, for example "flat vector illustration, bold outlines". Use this or photo, not both.
color_palette
list of strings
Up to 16 hex colors that steer the main colors. Uppercase #RRGGBB only.
compositional_deconstruction
Holds background (a string describing the setting) and elements (a list). Both are required.
Each element is an object ("obj") or text ("text"):
"obj"
type, bbox (optional), desc, color_palette (optional)
"text"
type, bbox (optional), text, desc, color_palette (optional)
type
string
"obj" for objects and subjects, "text" for text in the image
bbox
list of 4 integers
Position as [y_min, x_min, y_max, x_max]. Optional.
desc
string
A detailed description of the element
text
string
Text elements only: the exact words to render
color_palette
list of strings
Up to 5 uppercase #RRGGBB colors for this element. Optional.
Bounding boxes
Coordinates run from 0 to 1000 on each axis, with [0, 0] at the top-left corner, written as [y_min, x_min, y_max, x_max]. So [0, 0, 500, 1000] fills the top half of the image and [250, 250, 750, 750] sits in the center. Leave bbox out and the model places the element itself.
Color tips
Add the background colors to the palette if you want to set the overall tone.
Add both highlight and shadow colors for more control over lighting.
Write hex codes in uppercase
#RRGGBB, never#rgbor lowercase.
Example: no bounding boxes
A good first JSON prompt:
Settings: Ideogram 4.0, Magic Prompt off, aspect ratio 1:2.

Example: text with bounding boxes
When every line of text needs its own place:
Settings: Ideogram 4.0, Magic Prompt off, aspect ratio 1:2.

For tips on wording the text itself, see Text in Images.
Last updated