v4

latestOpenAPI 3.0.22026-08-02109239415.7 KB
prompt

Generate a Magic Prompt with Ideogram 4.0

Transforms a basic prompt into an enhanced Ideogram 4.0 magic prompt. The magic prompt model version is fixed; callers cannot select it. When aspect_ratio is AUTO (the default), the model selects the most suitable aspect ratio for the prompt and returns it in the response.

post/v1/ideogram-v4/magic-prompt

Request body

text_promptstring required

The natural-language prompt to enhance into an Ideogram 4.0 magic prompt. Named text_prompt to match the Ideogram 4.0 generate request surface.

aspect_ratio'AUTO' | '1x4' | '1x3' | '1x2' | '9x16' | '10x16' | '2x3' | '3x4' | '4x5' | '1x1' | '5x4' | '4x3' | '3x2' | '16x10' | '16x9' | '2x1' | '3x1' | '4x1'

The aspect ratio for an Ideogram 4.0 magic prompt. AUTO lets the model select the most suitable ratio from the prompt; any other value pins the ratio. The non-AUTO values are the buckets the 4.0 model supports.

Example request

{
  "text_prompt": "a cat",
  "aspect_ratio": "AUTO"
}

Response

Magic prompt generated successfully.

aspect_ratio'AUTO' | '1x4' | '1x3' | '1x2' | '9x16' | '10x16' | '2x3' | '3x4' | '4x5' | '1x1' | '5x4' | '4x3' | '3x2' | '16x10' | '16x9' | '2x1' | '3x1' | '4x1' required

The aspect ratio for an Ideogram 4.0 magic prompt. AUTO lets the model select the most suitable ratio from the prompt; any other value pins the ratio. The non-AUTO values are the buckets the 4.0 model supports.

Example response

{
  "json_prompt": {
    "high_level_description": "A photorealistic ginger cat perched on a vintage wooden chair by a sunlit window.",
    "style_description": {
      "aesthetics": "warm, cozy, nostalgic",
      "lighting": "soft natural window light",
      "medium": "photograph"
    },
    "compositional_deconstruction": {
      "background": "A dim room with a bright window casting warm light.",
      "elements": [
        {
          "type": "obj",
          "desc": "ginger cat with green eyes sitting upright on a vintage wooden chair"
        }
      ]
    }
  },
  "aspect_ratio": "1x1"
}