Misc
Remove Background API
Programmatically remove image backgrounds using Polotno Cloud API
How to use the Remove Background feature programmatically?
The hosted API requires a paid Polotno API key. Trial keys do not include background-removal credits. See pricing for usage charges.
Pass an absolute image URL or a complete base64 data URI. Relative file paths are not accepted. To call the API from your app:
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: 'https://example.com/image.png' }),
}
);
if (req.status !== 200) {
throw new Error('Error while removing background');
}
const res = await req.json();
// returns base64 data URL
return res.url;