Precise edit with Ideogram 4.5
Edit an image with Ideogram 4.5 and get the result back at that image’s
exact width and height. Upload the image as image using
multipart/form-data, with optional reference_images and a mask.
Returns results directly by default; set async or supply a
webhook_url to get a generation_id and poll
GET /v2/generations/{generation_id}.
Authentication
API key for access control. Use in the header with the name "Api-Key"
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
A request to edit an image with Ideogram 4.5 at that image's own size. Send it as multipart/form-data with the image to edit and any reference_images and mask.
The edit instruction, in natural language or as a structured JSON prompt. Natural language is automatically converted into a structured prompt; valid structured JSON is used as is.
The image to edit (max 25MB; JPEG, PNG, or WEBP). Multipart requests only. The output always matches this image's width and height, and pixels the edit did not meaningfully change are copied exactly from it. Images too large for the model are scaled down, keeping their proportions, and returned as rendered. Images with an aspect ratio outside 1:6 to 6:1 are rejected.
Optional images to guide the edit (max 4, max 25MB each; JPEG, PNG, or WEBP). They are never edited themselves; only image is. Multipart requests only. A request with a mask can include at most three, because the mask takes up one reference slot.
An optional mask that limits the edit to part of image (max 25MB; JPEG, PNG, or WEBP). Multipart requests only. Black marks the area to edit and white the area to keep; values in between are rounded to the nearer of the two. The mask must have the same width and height as image and contain both black and white areas. A masked request can include at most three reference_images.
The rendering quality to use. very_low is the fastest and cheapest, and high takes longer and is priced higher.
Optional. Run copyright detection on the generated images. Adds latency; flagged images are returned with is_image_safe: false.
When false (the default), the request waits until the images are ready and returns them in data. When true, the request returns as soon as it is accepted; poll GET /v2/generations/{generation_id} with the returned generation_id for the result.
HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a
JSON POST to this URL once all images for the request have finished
generating. The body mirrors the synchronous generate response:
request_id, created, and a data array
containing every generated image (url, prompt, resolution, seed,
is_image_safe). Each delivery is signed with Ed25519 and verifiable
against the public keys at https://api.ideogram.ai/v1/.well-known/jwks.json. Must be HTTPS;
private and loopback hosts and the cloud metadata service are rejected.
Response
The edited images (synchronous requests), or an acknowledgement to poll with GET /v2/generations/{generation_id} (async requests).
URL-safe base64 ID of the generation. Use it to poll
GET /v2/generations/{generation_id}.
The edited images, in generation order. Present only for synchronous requests (async omitted or false).