---
title: "Replace or recolor footwear in an advertisement"
method: POST
path: "/v2/tool/swap-product"
tags: ["edit-workflow"]
---

# Replace or recolor footwear in an advertisement

`POST /v2/tool/swap-product`

Edits the footwear in a source advertisement using ordered product references.
Poll `GET /v1/generations/{generation_id}` for status and image results.

## Request body

- SwapProductRequest
  - `source_asset_identifier` AssetIdentifier, required — An identifier for an ideogram asset.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `product_asset_identifiers` AssetIdentifier[], required — Ordered footwear references, following the source advertisement.
    - `asset_type` 'ASSET' | 'CANVAS_ASSET' | 'LAYERED_ASSET' | 'RESPONSE' | 'UPLOAD', required
    - `asset_id` string, required
  - `mode` 'replace' | 'recolor', required — Replace the footwear or match its colorway to the references.
  - `instruction` string — Optional edits that take precedence over the default preservation guidance.
  - `aspect_ratio` string — Output aspect ratio. Defaults to the closest supported ratio to the source.
  - `num_images` 1 | 2 | 3 | 4 | 6 | 8 — Number of images to generate.
  - `quality` 'low' | 'medium' | 'high' — The quality tier for the edit. Higher tiers may improve detail and take longer to complete.
  - `private` boolean — Results are private by default. Set false to request public results. Enterprise accounts always generate privately.
  - `webhook_url` string, uri — 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 `200`

Footwear edit accepted for asynchronous processing.

- SwapProductResponse
  - `generation_id` string, required — URL-safe base64 ID accepted by the generation polling endpoint.

## Other responses

- `400` — Invalid input provided.
- `401` — Unauthorized.
- `402` — Insufficient credits or quota.
- `403` — Not authorized to use this workflow.
- `404` — An input image was not found or is not readable.
- `422` — The instruction did not pass safety checks.
- `429` — Too many requests.

## Changes

- **2026-09-19** `4e95197be44a` — 5 breaking, 5 info
  - removed the enum value `HIGH` of the request property `quality`
  - removed the enum value `LOW` of the request property `quality`
  - removed the enum value `MEDIUM` of the request property `quality`
  - removed the enum value `RECOLOR` of the request property `mode`
  - …6 more
- **2026-09-16** `a235a15c0235` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/changes/v2/tool/swap-product/post.md)

---

[API](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc.dev/ideogram/apis/ideogram-openapi-3-0/revisions/987f73fc82de?raw)
