015774bae5bc
Repaint a masked region with Ideogram 3.0, by asset id or by uploaded bytes
Repaint the masked region of a source image from a text prompt with Ideogram 3.0. For each of the source image and the mask, supply either an AssetIdentifier reference (image_asset_identifier / mask_asset_identifier) or the raw image bytes directly (image / mask, multipart requests only). If both a reference and bytes are supplied for the same input, the reference wins and the bytes are ignored.
Optional style controls: a style preset or style reference images. Supply style references as a saved style (style_reference_collection_id), as style_reference_asset_identifiers references (images already stored with Ideogram), or as raw style_reference_images bytes (multipart requests only). If more than one form is supplied, the collection wins over the identifiers, and the identifiers win over the bytes.
The output matches the size of the source image (snapped to the nearest resolution the model renders). 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.
Request body
Example request
{
"image_asset_identifier": {
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
"mask_asset_identifier": {
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
"magic_prompt": "ON",
"seed": 12345,
"style_type": "GENERAL",
"style_preset": "BRIGHT_ART",
"style_reference_asset_identifiers": [
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
}
]
}Response
The repainted images (synchronous requests), or an acknowledgement to poll with GET /v1/generations/{generation_id} (async requests).
Example response
{
"data": [
{
"seed": 12345,
"prompt": "prompt",
"resolution": "1024x1024",
"url": "https://openapi-generator.tech",
"is_image_safe": true
},
{
"seed": 12345,
"prompt": "prompt",
"resolution": "1024x1024",
"url": "https://openapi-generator.tech",
"is_image_safe": true
}
],
"seed": 12345,
"generation_id": "generation_id",
"width": 0,
"height": 6
}