Skip to navigation

Colorways

Recolors masked regions of a product photo, each to its own target color, preserving the product’s geometry, materials, prints, logos, and everything outside the masks. Upload the image and up to 4 masks using multipart/form-data, with one entry in colors per mask. Returns a generation_id; poll GET /v2/generations/{generation_id} or supply a webhook_url.

Authentication

Api-Keystring

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

Query parameters

dry_runbooleanOptionalDefaults to false

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

The product photo, one mask or several masks marking the regions to recolor, and one target color per mask.
imagefileRequired

The product photo to recolor (max size 25MB). JPEG, PNG, and WEBP formats are supported.

masksfilesOptional

Masks marking the regions to recolor (max 4, max size 25MB each), paired by position with colors. JPEG, PNG, and WEBP formats are supported. Every mask must have the same pixel dimensions as the product photo. White pixels mark the region to recolor and black pixels are preserved; alpha-only masks also work (opaque = recolor, transparent = preserve).

colorslist of stringsRequired

One target color per mask in masks, 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)$"

Output aspect ratio. Defaults to the product photo’s aspect ratio, which keeps the original framing. A different ratio extends the scene to fill the new shape rather than cropping, 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 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