Edit an image with Ideogram 4.5, keeping the source's exact geometry
Edit an image with Ideogram 4.5, returning output at that image's exact width and height. An image too large for the model is scaled down to fit while keeping its exact proportion, and one whose aspect ratio is outside 1:6 to 6:1 is rejected — this endpoint never reshapes, so there is no size to reshape it to. Unlike POST /v2/image/generate/ideogram-4-5, this endpoint takes no size: the output always matches the image being edited, so the edit drops back into whatever it came from without reframing.
Pixels the edit did not meaningfully change are restored exactly from the image being edited, with the edited region blended smoothly into its surroundings — untouched areas stay identical across repeated edits.
Supply the image to edit as an image_asset_identifier reference or as raw image bytes (multipart requests only); if both are supplied, the reference wins and the bytes are ignored. Add up to four more images via reference_image_asset_identifiers or reference_images to guide the edit — those are never edited themselves.
Supply a mask to confine the edit to part of the image being edited. The mask is optional — without one the prompt is applied to the whole image. Masks are read as an additional reference image, so a masked request may carry at most three reference_images.
The prompt is the edit instruction. It accepts either natural language or a structured JSON prompt; the server detects which was supplied. A natural-language instruction is automatically rewritten into the model's structured edit contract, while a prompt that is already valid structured JSON is consumed directly.
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.
Supplying a webhook_url makes the request asynchronous whatever async says: the response returns as soon as the request is accepted, and the finished result is POSTed to that URL.
Query parameters
When true, the request is validated and priced but not run: nothing is generated, stored, or billed, and no safety review is performed. The response is a PriceQuote object instead of the usual response for this endpoint. Send exactly the request you would send to generate, so the quote reflects the same options.
Request body
Example request
{
"image_asset_identifier": {
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
"reference_image_asset_identifiers": [
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
}
],
"seed": 12345,
"webhook_url": "https://api.example.com/webhooks/ideogram"
}Response
The edited 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": 0,
"generation_id": "generation_id"
}