AI Image Background Remover (Using Web API)

Hi Everyone! Today I’m going to show you how to make an AI background remover app using Web API.
I’m using Background Remover for this.

:one: Design

Add an Image component that will receive the image from the user and will show the processed image.
The button will trigger the Code of background remover.
I have also added a label that would show the raw response.

:two: Setting up the API
I am using this API for Background Remover.

curl --request POST \
	--url \
	--header 'X-RapidAPI-Host:' \
	--header 'X-RapidAPI-Key: My API Key' \
	--header 'content-type: application/x-www-form-urlencoded' \
	--data image_url=

:two: Blocks

In Blocks, I coded the Image so that it can upload an Image.
Now, when the Button is Clicked the Code of Background Remover will be triggered.
The API URL will be, Headers will contain the API Host value, the API-Key, and the Content-Type.
The Body with object image_url will be the URL from the Uploaded image of the Image component.
This request will be posted and if an error occurs, the label Component will show the error if the request is successfully posted, the Image will have the parsed value of image_url of the response object.
Example Response-
“correlation_id”: “4d3e351f-cd3f-4dea-a4f3-0d0c0defa3f2”,
“error”: false,
“response”: {
“image_url”: “
Now the Project is Ready!
Hope you all Like this DIY Guide!


Great work thank you!!!

1 Like