edit-workflow

Replace or recolor footwear in an advertisement

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

post/v2/tool/swap-product

Request body

mode'REPLACE' | 'RECOLOR' required

Replace the footwear or match its colorway to the references.

instructionstring

Optional edits that take precedence over the default preservation guidance.

aspect_ratiostring

Output aspect ratio. Defaults to the closest supported ratio to the source.

num_images1 | 2 | 3 | 4 | 6 | 8

Number of images to generate.

quality'LOW' | 'MEDIUM' | 'HIGH'

The quality tier for the image edit. Higher tiers may improve detail and take longer to complete.

privateboolean

Results are private by default. Set false to request public results. Enterprise accounts always generate privately.

webhook_urlstring 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.

Example request

{
  "mode": null,
  "aspect_ratio": "aspect_ratio",
  "private": true,
  "webhook_url": "https://api.example.com/webhooks/ideogram",
  "instruction": "instruction",
  "source_asset_identifier": {
    "asset_type": "RESPONSE",
    "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
  },
  "num_images": 0,
  "product_asset_identifiers": [
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    },
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    },
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    },
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    },
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    }
  ],
  "quality": null
}

Response

Footwear edit accepted for asynchronous processing.

generation_idstring required

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

Example response

{
  "generation_id": "generation_id"
}

Changes