edit-workflow
Replace an image background
Replaces the background of one image from a text prompt while preserving the foreground subject. The foreground mask is detected automatically; callers do not provide a mask.
The request is processed asynchronously. Poll GET /v1/generations/{generation_id} with the returned generation_id until the generation is completed or failed.
Supply exactly one source transport: an existing AssetIdentifier in image_asset_identifier, or raw image bytes in a multipart request. Supplying both or neither is rejected with a 400.
post/v2/tool/replace-background
Request body
Example request
{
"image_asset_identifier": {
"asset_type": "RESPONSE",
"asset_id": "7uS_VESkRI6O3-sVgHQp_A"
},
"webhook_url": "https://api.example.com/webhooks/ideogram"
}Response
Background replacement accepted for asynchronous processing.
Example response
{
"generation_id": "generation_id"
}Changes
Changed in 1 of the 17 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○