Skip to main content
POST
Precise Edit Image

Authorizations

Authorization
string
header
required

API key from Settings > Developer > REST API

Headers

Moda-Version
enum<string>
default:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Available options:
2026-04-12,
2026-05-01
Example:

"2026-05-01"

Body

application/json
image
string
required

file_ id or http(s) URL of the image to edit (PNG, JPEG or WebP; up to 8192x8192).

prompt
string
required

What to change inside the edited area.

Required string length: 1 - 10000
mask
string | null

file_ id or http(s) URL of a mask: white marks the area to edit, black or transparent the area to keep (white strokes on a transparent layer work). Resized to the image.

context_window
string | null

Which region to edit at full resolution: auto (fit around the mask), none (edit the whole image; over 2048x2048 of area it comes back scaled down), or y_min,x_min,y_max,x_max in the image's own pixels, rows first, max edges exclusive (each side >= 256px, area <= 4194304px, aspect within 6:1). Default: auto with a mask, none without. Pixels outside the region come back unchanged.

quality
enum<string>
default:medium

Rendering quality; the only field that changes the price.

Available options:
very_low,
low,
medium,
high
seed
integer | null
Required range: 0 <= x <= 2147483647
model
string
default:ideogram-precise-edit
Allowed value: "ideogram-precise-edit"
idempotency_key
string | null

A retried call with the same key replays the stored response (replayed:true) instead of paying for a second provider render.

Maximum string length: 200

Response

Successful Response

The response is of type Response Mediapreciseeditimage · object.