Replace Background
sirv_replace_backgroundReplace an image's background while preserving its subject, and define the new backdrop with a text prompt or style reference image.
Instructions
Replace the background of one image and keep its subject. Describe the new background in prompt, or give a style image in ref_image_url.
Use it for a new backdrop. For a lifestyle scene with control over where the product sits, use sirv_place_product_in_scene. For a transparent background, use sirv_remove_background.
The default model keeps the product's own pixels. The source image does not change. Returns the result URL.
Credits: spends workspace credits. The cost depends on the model and options.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_url": "<image_url>"
},
"name": "sirv_replace_background"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model. ideogram-keep keeps the product's own pixels; the others can redraw the product. Default: ideogram-keep | ideogram-keep |
| prompt | No | The new background, in words. Give this or ref_image_url | |
| image_url | Yes | Public URL of the image whose subject to keep | |
| ref_image_url | No | Public URL of an image whose style the new background copies. Give this or prompt |