Skip to main content
POST
Retouch an image region
Send a black and white mask of the same size as mask_creation_id: white is changed, black is kept.

Authorizations

x-magnific-api-key
string
header
required

Your Magnific API key. Learn how to obtain an API key

Query Parameters

dry_run
boolean

true returns the price of the request instead of running it. Nothing is charged or created.

Body

application/json
creation_id
string
required

One of your image creations.

Maximum string length: 64
mask_creation_id
string
required

A black and white image creation of the same pixel size: white is changed, black is kept.

Maximum string length: 64
mode
enum<string>

replace (default) turns the masked region into prompt; erase removes it.

Available options:
replace,
erase
prompt
string | null

What the masked region should become. Required for replace.

Maximum string length: 2000
model
string | null

retouch-ideogram-4-5 (Ideogram 4.5, may repaint the whole frame) or retouch-precise-ideogram-4-5 (keeps every pixel outside the mask). Default: picked from mode.

Maximum string length: 100
resolution
string | null

One of the model's resolutions. Default: the model's own.

Maximum string length: 10
edit_type
enum<string> | null

precise keeps every pixel outside the mask; creative may regenerate the whole frame.

Available options:
precise,
creative,
null
webhook_url
string<uri>

A URL called once per creation when it completes or fails, signed with your API key's webhook secret. API keys only.

Maximum string length: 512
folder_reference
string

The reference of the project or folder to save the result in. Default: your Personal project.

Maximum string length: 64

Response

With dry_run=true: what the request would cost. Nothing is charged or created.

data
object
required