media

Precise Edit Image

Changed on

Repaint one region of an image from a prompt, at its full resolution (metered, Ideogram direct API).

post/media/precise-edit

Request

  • Base URL
    https://api.moda.app/v1
  • URL
    https://api.moda.app/v1/media/precise-edit
  • Auth
    HTTP bearer

Headers

Moda-Version'2026-04-12' | '2026-05-01'
Example: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.

Request body

imagestring required

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

promptstring required

What to change inside the edited area.

maskstring nullable

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_windowstring nullable

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'very_low' | 'low' | 'medium' | 'high'

Rendering quality; the only field that changes the price.

seedinteger nullable
model'ideogram-precise-edit'
idempotency_keystring nullable

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

Response

Successful Response

object required

Changes