Every tool works the same way: an HTTP request step sends the picture to the API and receives the finished picture back.
The request
- Method:
POST· URL:https://api.erasebackground.app/v1/removebg - Header:
X-Api-Key= your API key - Body: form-data with the file in the field
image_file(optional fields:bg_color,crop,format,size) - The answer is the finished picture (PNG or JPG) – save it to the next step.
Make (make.com)
- Add your trigger, e.g. Google Drive › Watch files in a folder, then Google Drive › Download a file.
- Add HTTP › Make a request: URL and method as above, header
X-Api-Key, Body type Multipart/form-data, fieldimage_fileof type File with the downloaded file. Set Parse response to No. - Add Google Drive › Upload a file with the HTTP module's Data as the file content.
Zapier
- Trigger: e.g. New File in Folder (Google Drive or Dropbox).
- Action: Webhooks by Zapier › POST: URL as above, Payload type Form, in Files add
image_file= the file from step 1, and under HeadersX-Api-Key. - Action: upload the returned file to Drive, Dropbox or your shop.
n8n
- Any trigger that gives a binary file (e.g. Google Drive, Webhook).
- HTTP Request node: POST, URL as above, header
X-Api-Key, Body Form-Data, parameter type n8n Binary File namedimage_file, Response format File. - Send the binary result to the next node.
Without files: base64
If your tool can only send text, send JSON instead:
POST https://api.erasebackground.app/v1/removebg
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
{ "image_file_b64": "<the picture as base64>", "bg_color": "ffffff" }