Product Color Change

Recolors the masked regions of the product photo, each to its own target color, while preserving the product's geometry, materials, prints, logos, and shading, and keeping every region outside the masks 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 masks marking the regions to recolor as either `AssetIdentifier` references (`mask_asset_identifiers`) or the raw mask bytes directly (`masks`, multipart requests only), paired by position with `colors` — up to 4 regions; a single-region edit is a one-item list. Provide exactly one of the two forms. Every mask must have the same pixel dimensions as the product photo. White pixels mark the region to recolor; black pixels are preserved. Alpha-only masks are also supported: opaque pixels mark the region to recolor and transparent pixels are preserved.

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Request

The product photo, one mask or several masks marking the regions to recolor, and one target color per mask. Use multipart/form-data to upload image bytes directly, or application/json (or multipart with image_asset_identifier) to reference an existing asset instead.

image_asset_identifierobjectOptional
An identifier for an ideogram asset.
imagefileOptional

The product photo to recolor (max size 25MB), as raw bytes; only JPEG, PNG, and WEBP formats are supported. Multipart requests only. Provide exactly one of image_asset_identifier or image.

mask_asset_identifierslist of objectsOptional
The masks marking the regions of the product photo to recolor, by reference, paired by position with `colors` (max 4). Every mask must have the same pixel dimensions as the product photo. White pixels mark the region to recolor; black pixels are preserved. Alpha-only masks are also supported: opaque pixels mark the region to recolor and transparent pixels are preserved. Provide exactly one of `mask_asset_identifiers` or `masks`.
masksfilesOptional
The masks marking the regions of the product photo to recolor (max 4, max size 25MB each), as raw bytes, paired by position with `colors`; only JPEG, PNG, and WEBP formats are supported. Every mask must have the same pixel dimensions as the product photo, and follows the same pixel rules as `mask_asset_identifiers`. Multipart requests only. Provide exactly one of `mask_asset_identifiers` or `masks`.
colorslist of stringsRequired

One target color per mask in masks or mask_asset_identifiers, as six-digit hex codes like #B3202C, paired by position. The product’s shape, construction, materials, prints, and logos are always preserved.

aspect_ratiostringOptionalformat: "^(1:1|3:4|4:3|16:9|9:16)$"
The aspect ratio of the generated image. Defaults to the aspect ratio of the product photo when omitted, which preserves the original framing exactly. When a different ratio is requested, the scene is extended to fill the new shape rather than cropped, so part of the frame is newly generated. Supported values are `1:1`, `3:4`, `4:3`, `16:9`, and `9:16`.
qualityenumOptional
The quality tier for the image edit. Higher tiers may improve detail and take longer to complete.
Allowed values:
webhook_urlstringOptionalformat: "uri"<=2048 characters
HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a JSON POST to this URL once all images for the request have finished generating. The body mirrors the synchronous generate response: `request_id`, `created`, and a `data` array containing every generated image (`url`, `prompt`, `resolution`, `seed`, `is_image_safe`). Each delivery is signed with Ed25519 and verifiable against the public keys at `https://api.ideogram.ai/v1/.well-known/jwks.json`. Must be HTTPS; private and loopback hosts and the cloud metadata service are rejected.

Response

Colorway accepted for asynchronous processing.
generation_idstring

URL-safe base64 ID accepted by the generation polling endpoint.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
429
Too Many Requests Error