---
title: "Edit an image with Ideogram 4.5, keeping the source's exact geometry"
method: POST
path: "/v2/image/precise-edit/ideogram-4-5"
tags: ["images-precise-edit"]
---

# Edit an image with Ideogram 4.5, keeping the source's exact geometry

`POST /v2/image/precise-edit/ideogram-4-5`

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

- `dry_run` boolean

## Request body

- PreciseEditImageIdeogram45Request — The image being edited is required, as an `image_asset_identifier` reference or as raw `image` bytes. The output is always returned at that image's exact width and height, so this request takes no output size.
  - `prompt` string, required — The edit instruction to apply to the sources. Accepts either natural language or a structured JSON prompt; the server detects which was supplied. Natural language is automatically rewritten into the model's structured edit contract, while structured JSON is consumed directly.
  - `image_asset_identifier` AssetIdentifier — An identifier for an ideogram asset.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `image` string, binary — The image to edit, as raw bytes (max size 25MB; JPEG, PNG, or WEBP only). Multipart requests only; ignored if `image_asset_identifier` is also supplied. Required when supplying a `mask`.
  - `reference_image_asset_identifiers` AssetIdentifier[] — Optional additional images to guide the edit, by reference. These are never edited themselves; only `image_asset_identifier` or `image` is. Requires the image being edited to be supplied by reference too, and cannot be combined with `mask`.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `reference_images` string[] — Optional additional images to guide the edit (max 4, max size 25MB each), as raw bytes; only JPEG, PNG, and WEBP formats are supported. These are never edited themselves; only `image` is. Multipart requests only; ignored if `reference_image_asset_identifiers` is also supplied. A masked request may carry at most three, because the mask occupies one of the model's reference slots.
  - `mask` string, binary — An optional mask confining the edit to part of `image`, as raw bytes (multipart requests only; JPEG, PNG, or WEBP, max 25MB). Black marks the area to edit and white the area to preserve; values in between are rounded to whichever is nearer. The mask must have the same width and height as `image`, and must contain both black and white areas. Requires the image being edited to be uploaded as raw `image` bytes in the same request; masks cannot be combined with asset references. The mask is supplied to the model as an additional reference image, so a masked request may carry at most three `reference_images`.
  - `quality` 'low' | 'medium' | 'high' | 'very_high' — The rendering quality to use. `very_high` renders multiple candidate edits internally and returns the one that best applies the instruction; it takes longer than `high`, is priced higher, and supports at most 4 images per request.
  - `seed` integer — Random seed. Set for reproducible generation.
  - `num_images` integer — The number of images to generate.
  - `enable_copyright_detection` boolean, nullable — Optional. Opt this request into post-generation copyright detection. Adds detection latency; flagged images come back with `is_image_safe: false`.
  - `async` boolean — When false (the default), the request blocks until the images are ready and returns them in `data`. When true, the request returns as soon as it is accepted; poll for completion and results with `GET /v1/generations/{generation_id}` using the returned `generation_id`.
  - `webhook_url` string, uri — 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.
  - `private` boolean, nullable — When true or omitted, the output is kept private to your account. Set to false to publish the output to the public feed. Enterprise accounts always generate privately.
  - `target_collection_id` string — A collection you can write to, by its URL-safe base64 collection id. The output images are added to it when the request completes.

## Response `200`

The edited images (synchronous requests), or an acknowledgement to poll with `GET /v1/generations/{generation_id}` (`async` requests).

- PreciseEditImageIdeogram45Response — Response returned by `POST /v2/image/precise-edit/ideogram-4-5`. Synchronous requests (the default) include the edited images in `data`. Requests with `async` set to true omit `data`; poll for completion and results with `GET /v1/generations/{generation_id}` using the returned `generation_id`. The seed reports the value the request resolved to when the caller left it unset.
  - `generation_id` string — URL-safe base64 ID of the accepted generation. Accepted by the `GET /v1/generations/{generation_id}` polling endpoint.
  - `data` GeneratedImageObject[] — The edited images, in generation order. Present only for synchronous requests (`async` omitted or false).
    - `url` string, uri, nullable — The direct link to the generated image. Empty when the image did not pass safety checks.
    - `prompt` string, required — The final prompt the image was generated from.
    - `resolution` string, required — The resolution of the generated image, formatted as "WIDTHxHEIGHT".
    - `is_image_safe` boolean, required — Whether the image passed safety checks. If false, `url` is empty.
    - `seed` integer, required — Random seed. Set for reproducible generation.
  - `seed` integer — The seed the request was served with.

## Other responses

- `400` — Invalid input provided.
- `401` — Unauthorized.
- `402` — Insufficient credits or quota.
- `422` — The prompt did not pass safety checks.
- `429` — Too many requests.
- `500` — Internal server error.
- `503` — The endpoint is temporarily unavailable.

## Changes

- **2026-09-25** `52c1c6497d87` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/changes/v2/image/precise-edit/ideogram-4-5/post.md)

---

[API](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/revisions/52c1c6497d87?raw)
