How to hit the remove.bg API

remove.bg's API at https://api.remove.bg/v1.0 removes image backgrounds. Point it at an image by URL with image_url; the response is the PNG itself (add -o out.png in curl). This is a multipart form — in PostTaco, the Body tab's Form mode.

Authentication

Get a key at remove.bg and send it as the X-Api-Key header. In the examples it's written {{REMOVEBG_API_KEY}}.

Full reference: https://www.remove.bg/api

Remove a background (by URL)

Example image from remove.bg's docs.

curl -X POST https://api.remove.bg/v1.0/removebg \
  -H "X-Api-Key: {{REMOVEBG_API_KEY}}" \
  -F image_url=https://www.remove.bg/example.jpg \
  -F size=auto
Run in PostTaco

Credit balance

curl https://api.remove.bg/v1.0/account \
  -H "X-Api-Key: {{REMOVEBG_API_KEY}}"
Run in PostTaco