Remove Background API

How to use the Remove Background feature programmatically?

As part of the Business plan, you can use the API to remove backgrounds from images. The call the app you can do this:

const req = await fetch(
  'https://api.polotno.com/api/remove-image-background?KEY=YOUR_API_KEY',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ url: 'path-to-image-or-base64-dataurl' }),
  }
);
if (req.status !== 200) {
  throw new Error('Error while removing background');
}
const res = await req.json();
// gives back base64 data ur
return res.url;

News, updates and promos – be the first to get 'em

News, updates and promos – be the first to get 'em