v4

latestOpenAPI 3.0.22026-08-02109239415.7 KB
generate

Generate an editable design with Ideogram 4.0 HTML

Experimental prototype endpoint for generating an editable V4 HTML design from a prompt.

Optionally accepts inspiration reference images to guide transferable visual style. Inspiration images are design/style references only and are not edit targets.

Images links are available for a limited period of time; if you would like to keep the image, you must download it.

post/v1/ideogram-v4/generate-design

Request body

promptstring required

The text prompt for editable design generation.

seedinteger nullable

Random seed for reproducibility.

magic_prompt_option'AUTO' | 'ON' | 'OFF'

Determine if MagicPrompt should be used in generating the request or not.

magic_prompt_system_prompt_config_idstring

A base64url-encoded magic prompt system prompt config ID to use for this request.

resolution'1024x1024' | '896x1120' | '1120x896' | '864x1152' | '1152x864' | '832x1248' | '1248x832' | '800x1280' | '1280x800' | '720x1280' | '1280x720' | '720x1440' | '1440x720'

The resolutions supported for Ideogram 4.0 layout-to-image and design generation.

rendering_speed'FLASH' | 'TURBO' | 'BALANCED' | 'DEFAULT' | 'QUALITY'

The rendering speed to use.

inspiration_reference_imagesstring[]

Experimental. Up to 4 static inspiration images used as transferable visual style references for V4 layout-to-image design. Images are not edit targets and are not inserted into the generated HTML layout. Supported formats are JPEG, PNG, and WebP (max size 10MB each). Animated images are not supported.

inspiration_reference_model'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' nullable

Experimental. Model to use for the inspiration vision prepass.

artifact_generation_model'claude-sonnet-4-6' | 'claude-opus-4-6' | 'claude-opus-4-7' nullable

Experimental. Model to use for the HTML/layout and base-plate handoff generation call.

layout2image_variant'opus_4_7' | 'separate_image_layer' | 'bbox_aware' nullable

Experimental. Staging only. Select a v4 layout-to-image pipeline variant. Omit for the default v4l2i path. Rejected on production.

response_type'layered' | 'url' | 'binary' | 'html' nullable

layered (default): full editable design payload with text layers and HTML. url: JSON with an expiring link to the final composited cover image. binary: raw PNG bytes of the final composited cover image (Content-Type image/png). html: raw HTML document of the generated layout (Content-Type text/html).

Example request

{
  "magic_prompt_option": "ON",
  "resolution": "1024x1024"
}

Response

Design(s) generated successfully.

OR

Example response

{
  "data": [
    {
      "text_containers": [
        {
          "id": "id",
          "items": [
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            },
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            }
          ]
        },
        {
          "id": "id",
          "items": [
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            },
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            }
          ]
        }
      ],
      "image_layers": [
        {
          "ref_id": "REF_0",
          "x": 4,
          "width": 1,
          "y": 7,
          "height": 1
        },
        {
          "ref_id": "REF_0",
          "x": 4,
          "width": 1,
          "y": 7,
          "height": 1
        }
      ],
      "url": "https://openapi-generator.tech",
      "text_html": "text_html"
    },
    {
      "text_containers": [
        {
          "id": "id",
          "items": [
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            },
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            }
          ]
        },
        {
          "id": "id",
          "items": [
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            },
            {
              "font_candidates": [
                "font_candidates",
                "font_candidates"
              ],
              "spans": [
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                },
                {
                  "color": "#212121",
                  "text": "text",
                  "font_fx": [
                    "bold",
                    "italic"
                  ]
                }
              ],
              "text_shadows": [
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                },
                {
                  "color": "color",
                  "blur": 0.2027123,
                  "offset_x": 9.301444,
                  "offset_y": 3.6160767
                }
              ],
              "font_size": 5,
              "vertical_alignment": "top",
              "text_transform": "none",
              "glyph_type": "bullet",
              "line_height": 2.302136,
              "x": 0,
              "width": 1,
              "style_class": "body",
              "y": 6,
              "angle": 0,
              "alignment": "center",
              "font_file": "font_file",
              "letter_spacing": 7.0614014,
              "height": 5
            }
          ]
        }
      ],
      "image_layers": [
        {
          "ref_id": "REF_0",
          "x": 4,
          "width": 1,
          "y": 7,
          "height": 1
        },
        {
          "ref_id": "REF_0",
          "x": 4,
          "width": 1,
          "y": 7,
          "height": 1
        }
      ],
      "url": "https://openapi-generator.tech",
      "text_html": "text_html"
    }
  ],
  "created": "2000-01-23T04:56:07+00:00",
  "response_type": "layered"
}