How to remove background of image using cloudinary_ai
Hi there,
I have uploaded an image to cloudinary. https://res.cloudinary.com/jan-pieters-websolutions/image/upload/v1641816380/Attachment_1639428590_69396a2e.jpg
Now I would like to remove the background of this image with the Cloudinary AI Background Removal using the Update
Admin API, but how can I do that within Cloudinary? If I edit the file within cloudinary I can't find the background_removal parameter.
-
Official comment
Hi Jan,
Thank you for reaching out! Using the Cloudinary CLI, I'm able to achieve the background removal with the following command:
cld admin update flower_base background_removal=cloudinary_ai
Here's the result:
https://tdatu-res.cloudinary.com/image/upload/v1641837316/flower_base.png
The command above is documented on our Admin API page and gives it an optional parameter background_removal. In addition, there are also other language examples (python, ruby, etc..) in which are equivalent to the command above. For your use case, the command will be the following:
cld admin update Attachment_1639428590_69396a2e background_removal=cloudinary_ai
You may also want to consider setting up a notification webhook for your Media Library under Settings > Upload so that when the background removal process is done, you will get notified. There are lots of free webhook sites available for use.
-Anthony
Comment actions
Please sign in to leave a comment.
Comments
1 comment