When replacing the background with a solid color, consider also adding an AI Shadow for a more visually pleasing result:
Static Image
To replace the background with a static image, set the either the argument background.imageFile (available only when using the POST endpoint) or background.imageUrl:
(original image)
(static image)
(result)
If you want to give it a try, here's the code to reproduce the example above:
When replacing the background with a static image, consider also adding an AI Shadow for a more visually pleasing result: