v4
latestOpenAPI 3.0.22026-08-02109239415.7 KBprompt
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
Example request
{
"text_prompt": "a cat",
"aspect_ratio": "AUTO"
}Response
Magic prompt generated successfully.
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"
}