Repaint a masked region with a custom Ideogram 3.0 model
Repaint the masked region of a source image with a custom Ideogram 3.0 model the authenticated user or organization can access. Supply the model URI returned by the custom-model API as custom_model_uri.
For each of the source image and mask, supply either an AssetIdentifier reference (image_asset_identifier / mask_asset_identifier) or raw bytes (image / mask, multipart requests only). A reference wins if both forms are supplied.
Optional style controls are style codes, a style preset, or style reference images. Supply style references as a saved style, existing asset identifiers, or raw image bytes. Only one style control may be used; when multiple reference forms are supplied, the collection wins over identifiers, and identifiers win over bytes.
By default the request blocks until the images are ready. Set async to true to return after dispatch and poll GET /v1/generations/{generation_id}.
Query parameters
When true, the request is validated and priced but not run: nothing is generated, stored, or billed, and no safety review is performed. The response is a PriceQuote object instead of the usual response for this endpoint. Send exactly the request you would send to generate, so the quote reflects the same options.
Request body
Example request
{
"custom_model_uri": "model/my-custom-model/version/1",
"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_preset": "bright_art",
"style_codes": [
"AAFF5733",
"0133FF57",
"DE3357FF"
],
"style_reference_asset_identifiers": [
{
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
}
]
}Response
The repainted images, or an acknowledgement for an asynchronous request.
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
}