Material swap
ideogram_material_swapReplace the material of masked product photo regions with reference image color, texture, and pattern, up to four mask-material pairs.
Instructions
Apply the material of reference images — colour, texture, pattern scale, orientation — to the masked regions of a product photo (up to 4 masks and materials, paired by position). Files, public https URLs or Ideogram assets. Results are saved to the output directory; long jobs come back as a generation_id for ideogram_generation; ideogram_quote prices a call first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | No | The source photo or ad to work on: a local image file or a public https URL (image_asset_identifier for an Ideogram asset) | |
| masks | No | Local mask files (or public https URLs) marking the regions to change, paired by position (at most 4, the product photo's pixel size) | |
| wait_s | No | Seconds to wait for the result (0-50, default 45). The job is accepted first; if it is still running when the wait ends, the result is its generation_id for ideogram_generation (never resubmitted, never billed twice). | |
| private | No | Keep the result out of Ideogram's public feed; true unless you set false (enterprise accounts are always private) | |
| quality | No | low, medium or high: higher may improve detail and takes longer | |
| materials | No | Local material reference images (or public https URLs) whose colour, texture, pattern scale and orientation are applied, paired by position with masks (at most 4) | |
| aspect_ratio | No | Output aspect ratio with a colon — 1:1, 3:4, 4:3, 16:9 or 9:16 where the operation lists them (colorways and material swap default to the photo's ratio, ghost mannequin and sketch to render to 1:1, pose variants to the nearest supported); magic prompt: the ratio to pin, or omitted for the model's pick | |
| inline_images | No | true: each saved image is also returned as image content (base64; one over 3.75 MB, or past 10 MB in total, by path only), for a client without file access | |
| image_asset_identifier | No | An Ideogram asset (an upload or an earlier result) instead of a local image | |
| mask_asset_identifiers | No | Ideogram assets as the masks, paired by position (at most 4) | |
| material_asset_identifiers | No | Ideogram assets as the material references, paired by position (at most 4) |