# How to JSON prompt for Ideogram 4.0

Ideogram publishes a public search API over its indexed pages; the guide is at https://ideogram.toolspoint.net/agents/agent-access.

Source: https://ideogram.toolspoint.net/blog/ideogram-4-json-prompting/
Source observed: 2026-12-03T22:08:11.414Z
Last checked: 2026-12-03T22:08:11.414+00:00
Indexed: 2026-12-03T22:35:06.214+00:00

---

# How to JSON prompt for Ideogram 4.0

**Jackson Shi · Jun 18, 2026 · Last updated: Jun 18, 2026**

Why older prompts can behave differently in Ideogram 4.0, what JSON captions are, and how to control text, layout, color, and style.

Ideogram 4.0 was trained on structured JSON captions: organized, labeled image information rather than one run-on sentence. You do not need coding experience, but matching this structure can make results more controllable.

## Why prompts can feel different in 4.0

Ideogram 4.0 is more literal. General words such as “moody,” “vibrant,” and “editorial feel” carry less weight than specific descriptions such as “warm directional light from the upper left” or “Hasselblad medium format, slightly desaturated.” Use named references, specific light sources, exact colors, and other concrete vocabulary.

### Why am I hitting the safety filter?

Plain-text prompts trigger significantly more false positives with the safety filter than structured prompts. Adding more detail to JSON is presented as the fastest fix for an innocuous prompt that is blocked.

## JSON explained

JSON gives each part of an image its own labeled slot. Four useful jobs are:

- Overall scene: `high_level_description`
- Visual style: `style_description`
- Background: `background`
- Specific objects: `elements`

### Example structured caption

```json
{
  "high_level_description": "Lush tropical greenhouse interior, Rousseau-style oil painting",
  "style_description": {
    "aesthetics": "dreamlike, abundant, deeply saturated",
    "lighting": "dappled greenhouse light through glass ceiling",
    "medium": "oil painting",
    "art_style": "Henri Rousseau, naive jungle painting, rich impasto"
  },
  "compositional_deconstruction": {
    "background": "dense emerald and cadmium green foliage filling the frame",
    "elements": [
      { "type": "obj", "desc": "broad tropical leaves in deep green, layered and overlapping" },
      { "type": "obj", "desc": "exotic orchids in crimson and gold, scattered throughout" },
      { "type": "obj", "desc": "a parrot perched mid-frame, vivid red and blue plumage" }
    ]
  }
}
```

Plain text leaves more choices for the model to infer. A structured caption explicitly names the oil medium, saturated palette, orchids, parrot, and layered foliage.

## JSON fields

| Field | Description | Type |
|---|---|---|
| `high_level_description` | One- or two-sentence scene summary; start with the subject and recognizable properties; keep it under 50 words. | `string` |
| `style_description` | Visual style including aesthetics, lighting, medium (`photograph`, `illustration`, or `graphic_design`), and optionally a color palette. | `object` |
| `compositional_deconstruction` | Background description plus an `elements` array; this is where layout, text placement, and bounding boxes live. | `object` |

### Key ordering matters

Use the trained field order:

- **Photography:** `aesthetics` → `lighting` → `photo` → `medium` → `color_palette`
- **Illustration/design:** `aesthetics` → `lighting` → `medium` → `art_style` → `color_palette`

[CaptionVerifier](https://github.com/ideogram-oss/ideogram-4) catches ordering mistakes before generation.

## Moving from natural language to JSON

**Magic Prompt** translates a normal sentence into a structured JSON caption before it reaches the model. On the live version of 4.0, it automatically decides whether to expand the input. Plain text is expanded; valid, well-formed JSON passes through unchanged.

Magic Prompt can:

- Populate sparse scenes with secondary elements you did not request.
- Upgrade vague references to specific ones, such as “Nike Air Jordan 1” instead of “retro sneaker.”
- Remove hedging language such as “could include,” “various,” and “or similar.”
- Drop render metadata such as bokeh and film grain unless explicitly named.
- Choose one value when you provide alternatives, such as changing “cream or ivory” to “cream.”

Use Magic Prompt for exploration. Write JSON directly when exact hex colors or text placement are non-negotiable; Magic Prompt does not expand an already structured prompt.

## Text rendering

Ideogram 4.0 supports literal text rendering. Put the exact text you want rendered in double quotes. In JSON, use `"type": "text"`, a `"text"` field for the literal string, and `"desc"` for its visual treatment.

Keep each quoted string to **5–7 words maximum**, because accuracy declines with longer strings. For chart or label numbers, words such as “forty-two percent” are described as more reliable than `42%` at small sizes.

Approximate guidance in the article:

- Large English text: `~97%` accurate
- Small English text: `~90%` accurate
- Large Arabic text: works well for single words and short phrases
- Small Arabic text or full paragraphs: expect garbling and phantom letters

## Controlling placement with bounding boxes

Ideogram 4.0 uses bounding-box coordinates on a `0–1000` grid. The format is `[y_min, x_min, y_max, x_max]`, with `0` at the top-left and `1000` at the bottom-right. The lower-right quadrant is `[500, 500, 1000, 1000]`.

```json
{ "type": "obj", "bbox": [535, 96, 830, 523], "desc": "folded broadsheet newspaper" }
```

Use bounding boxes for posters, packaging, social templates, infographics, and other layout-sensitive images. They are layout guides rather than pixel-perfect crops, so leave margin.

Rules:

- Ground, floor, and pavement belong in `background`, not as bounding-box elements.
- Keep total elements to **5 or fewer** per image for best quality.
- Boxes are guides, not exact crops.

### Complete placement example

```json
{
  "high_level_description": "Overhead flat lay of a breakfast table, morning light",
  "style_description": {
    "aesthetics": "clean, editorial",
    "lighting": "soft natural window light, warm morning",
    "medium": "food photography"
  },
  "compositional_deconstruction": {
    "background": "white linen tablecloth, soft shadows",
    "elements": [
      { "type": "obj", "bbox": [293, 288, 461, 461], "desc": "ceramic coffee cup with latte art" },
      { "type": "obj", "bbox": [266, 549, 496, 781], "desc": "buttered croissant on a small plate" },
      { "type": "obj", "bbox": [535, 96, 830, 523], "desc": "folded broadsheet newspaper" },
      { "type": "obj", "bbox": [549, 584, 781, 861], "desc": "small glass vase with fresh tulips" }
    ]
  }
}
```

The labeled zones are:

- Coffee cup: `[293, 288, 461, 461]`
- Croissant: `[266, 549, 496, 781]`
- Newspaper: `[535, 96, 830, 523]`
- Tulips: `[549, 584, 781, 861]`

## Exact brand colors

Ideogram 4.0 supports hex color conditioning. A code such as `#2D5A27` anchors the image palette around that value.

| Field | Description | Limit |
|---|---|---|
| `color_palette` (style) | Image-wide dominant palette; include background and shadow values, not only the primary brand color. | Up to 16 hex codes |
| `color_palette` (element) | Per-element color steering for a particular text or object. | Up to 5 hex codes |

Hex formatting is strict: use uppercase `#RRGGBB`, with no shorthand and no lowercase. Include a background color and a shadow or highlight value. The article gives this complete example:

```json
["#0A0A0A", "#C9A84C", "#FFFFFF"]
```

## Keeping a consistent look with Style Codes

A **Style Code** is a fingerprint extracted from a generation and passed as `style_code` to future prompts. It is intended to carry the same visual DNA across a series.

The article shows one fox portrait prompt with three style codes:

- Dutch oil: `SC_7f3d2`
- Woodblock: `SC_2a8c1`
- Bauhaus: `SC_9e4f3`

Codes extracted from the `V4_QUALITY_48` preset are described as tending to produce better results when reapplied.

## Preset quality levels

- `V4_TURBO_12` — approximately `~21s at 1024²`; exploration and drafts
- `V4_DEFAULT_20` — approximately `~32s at 1024²`; daily production work
- `V4_QUALITY_48` — approximately `~72s at 1024²`; finals, typography-critical output, and Style Code extraction

## Settings that change output

| Setting | Description | Values |
|---|---|---|
| `style_code` | Locks an exact visual aesthetic by code; extract it from a favored generation in the app panel. | `SC_xxxxx` |
| `style_type` | Broad aesthetic category when no Style Code is set; `AUTO` lets the model infer from the prompt. | `REALISTIC` · `DESIGN` · `AUTO` |
| `magic_prompt` | Always `AUTO` on live Ideogram 4.0; plain text is expanded into JSON and valid JSON passes through unchanged. | `AUTO` |
| `negative_prompt` | Elements to suppress; specific positive framing works better than a long exclusion list. | `string` |
| `seed` | Reproducibility anchor; same seed and prompt produce the same composition. | `integer` |
| `sampler_preset` | Quality/speed tradeoff; `V4_QUALITY_48` is recommended for typography-critical output. | `V4_TURBO_12` · `V4_DEFAULT_20` · `V4_QUALITY_48` |

## Plain text versus JSON

| When to use | Approach |
|---|---|
| First idea or exploration | Plain text; Magic Prompt expands it |
| Brand asset with exact colors | JSON with `color_palette` |
| Poster or packaging with specific text | JSON with text elements and `bbox` |
| Full campaign consistency | JSON with a `style_code` from a hero image |
| Prompt blocked by the safety filter | JSON prompt |
| Self-hosted or local inference | JSON; the Magic Prompt backend is separate |

## Open-source tooling

The JSON schema, CaptionVerifier, and three Magic Prompt backends are available at [github.com/ideogram-oss/ideogram4](https://github.com/ideogram-oss/ideogram-4). The backends can use the hosted Ideogram API, Claude Opus/Sonnet through OpenRouter, or Gemini Flash-Lite.

## What to try next

Start with a plain-language prompt, add a `style_code` to lock the look, and switch to JSON when you need exact colors or placed text. The article describes these API and tooling options:

- Generate at scale with the [generate endpoint](https://developer.ideogram.ai/v1/api-reference/generate-images/generate-v4); techniques include batch runs, seed pinning, and Style Code reuse.
- Explore [open-source tooling](https://github.com/ideogram-oss/ideogram-4) locally or with another LLM backend.
- For photo-first workflows, follow the [Ideogram 4.5 product photo editing guide](https://ideogram.toolspoint.net/blog/ideogram-4-5-product-photo-editing/).

## Start generating

[Open Ideogram](https://ideogram.toolspoint.net/)

[Get started](https://ideogram.toolspoint.net/signup?intent=app&source=blog-ideogram-4-json-prompting-end)

Article by **Jackson Shi**

---

[Read this page’s summary](https://ideogram.toolspoint.net/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fideogram.ai%2Fblog%2Fideogram-4-json-prompting%2F&trace=t_380edc68d53d)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Ideogram’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://ideogram.toolspoint.net/agents/agent/faq?q={question}&trace=t_380edc68d53d`

[Tool guide and examples](https://ideogram.toolspoint.net/agents/agent-access) · [OpenAPI](https://ideogram.toolspoint.net/agents/api/public/v1/openapi.json) · [Page TLDR form](https://ideogram.toolspoint.net/agents/agent-tools/page-tldr?url=https%3A%2F%2Fideogram.ai%2Fblog%2Fideogram-4-json-prompting%2F). Opening a form does not execute a tool.