898026c78d68
Change a product's color while preserving everything else
Recolors the masked region of the product photo to the target color while preserving the product's geometry, materials, prints, logos, and shading, and keeping every region outside the mask unchanged.
The request is processed asynchronously. Poll GET /v1/generations/{generation_id} with the returned generation_id until the generation is completed or failed.
Supply the product photo as either an AssetIdentifier reference (image_asset_identifier) or the raw image bytes directly (image, multipart requests only). Provide exactly one of the two forms; supplying both, or neither, is rejected with a 400.
Supply the mask marking the region to recolor as either an AssetIdentifier reference (mask_asset_identifier) or the raw mask bytes directly (mask, multipart requests only). Provide exactly one of the two forms. The mask must have the same pixel dimensions as the product photo; white (or opaque) pixels mark the region to recolor.
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"
},
"webhook_url": "https://api.example.com/webhooks/ideogram"
}Response
Colorway accepted for asynchronous processing.
Example response
{
"generation_id": "generation_id"
}