edit-workflow

Replace the model in a commerce image

Re-casts a fashion commerce image with the identity shown in one or more ordered target-model references. The workflow uses the working image for the product, pose, scene, lighting, framing, and camera, and uses the target references only for identity, hair, skin tone, and body proportions. Results are full-frame edits; exact pixel preservation is not guaranteed.

The request is processed asynchronously. Poll GET /v1/generations/{generation_id} with the returned generation_id until the generation is completed or failed.

post/v2/tool/model-swap

Request body

source_imagestring binary

Raw working-image bytes. Supported formats and the 50 MB limit match the image upload API. Available only with multipart/form-data.

instructionstring

Optional identity details that are not visible in the target-model references. This cannot override the source roles described above.

aspect_ratiostring

Output aspect ratio. When omitted, the closest supported ratio is derived from the working image.

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

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

seedinteger

Optional seed for repeatable results.

num_imagesinteger

Number of model-swap images to create.

privateboolean

When true or omitted, the output is kept private to your account. Set to false to publish the output to the public feed. 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

{
  "source_asset_identifier": {
    "asset_type": "RESPONSE",
    "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
  },
  "model_asset_identifiers": [
    {
      "asset_type": "RESPONSE",
      "asset_id": "7uS_VESkRI6O3-sVgHQp_A"
    }
  ],
  "webhook_url": "https://api.example.com/webhooks/ideogram"
}

Response

Model swap accepted for asynchronous processing.

generation_idstring required

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

Example response

{
  "generation_id": "generation_id"
}

Changes