898026c78d68
Generate transparent-background images with Ideogram 4.0
Generate one or more images on a transparent background with Ideogram 4.0, delivered as PNGs with alpha. The prompt accepts either natural language or a structured Ideogram 4.0 JSON prompt; a structured prompt is consumed directly and skips magic prompt, except that its background description is replaced with a transparent-background directive.
magic_prompt controls how a natural-language prompt is prepared: AUTO/ON rewrite and expand the prompt before generation, while OFF keeps your wording and only converts the prompt into the structured format the model consumes.
output_resolution selects the output tier (1K to 8K); tiers above 2K are produced by upscaling after generation.
By default the request blocks until the images are ready and returns them in data. Set async to true to return immediately after the request is accepted, then poll for completion and results with GET /v1/generations/{generation_id} using the returned generation_id.
Request body
Example request
{
"magic_prompt": "",
"aspect_ratio": null,
"async": false,
"seed": 12345,
"rendering_speed": "DEFAULT",
"enable_copyright_detection": true,
"output_resolution": "1K",
"prompt": "prompt",
"num_images": 1
}Response
The generated images (synchronous requests), or an acknowledgement to poll with GET /v1/generations/{generation_id} (async requests).
Example response
{
"data": [
{
"seed": 12345,
"prompt": "prompt",
"resolution": "1024x1024",
"url": "https://openapi-generator.tech",
"is_image_safe": true
},
{
"seed": 12345,
"prompt": "prompt",
"resolution": "1024x1024",
"url": "https://openapi-generator.tech",
"is_image_safe": true
}
],
"seed": 12345,
"generation_id": "generation_id"
}