I was actually following these steps:
const form = new FormData()
form.append('image_file', photo)
form.append('mask_file', mask)
fetch('https://clipdrop-api.co/cleanup/v1', {
method: 'POST',
headers: {
'x-api-key': YOUR_API_KEY,
},
body: form,
})
.then(response => response.arrayBuffer())
.then(buffer => {
// buffer here is a binary representation of the returned image
})
but since i'm a complete newbie on js(i'm a statistician, know some r, some python, but had never touched js) i'm struggling as hell
think it might be a good idea to get some 2 days of a js intro course to get to know the place kkkk