Has anyone been able to make an api call to remove.bg from scripting or a script within an automation?
I haven’t tried that API yet. Have you had more success since first submitting your question? If not, would you be willing to share sample code that you’ve tried?
Yeah remove.bg is relatively straight forward in the end
//get the url of the attachment field
let angle1Url = angle1[0].url
console.log(angle1Url)
let response = await remoteFetchAsync('https://api.remove.bg/v1.0/removebg',
{
method: 'POST',
body: JSON.stringify({
"image_url": angle1Url,
"size": "full",
"scale":"90%",
"bg_color" : "white",
"type": "tiff",
"output": "angle1.tiff"
}),
headers: {
'Content-Type': 'application/json',
'X-Api-Key': yourAPI_Key,
'accept': 'application/json'
},
});
let theData = await response.json()
let base64String = theData.data.result_b64
I’m now struggling with cloud convert, well I have that working except I cant parse the webhook it sends with Airtables limited parsing, but I guess I’ll have to loop the api calls until it returns the processed result.
Yeah remove.bg is relatively straight forward in the end
//get the url of the attachment field
let angle1Url = angle1[0].url
console.log(angle1Url)
let response = await remoteFetchAsync('https://api.remove.bg/v1.0/removebg',
{
method: 'POST',
body: JSON.stringify({
"image_url": angle1Url,
"size": "full",
"scale":"90%",
"bg_color" : "white",
"type": "tiff",
"output": "angle1.tiff"
}),
headers: {
'Content-Type': 'application/json',
'X-Api-Key': yourAPI_Key,
'accept': 'application/json'
},
});
let theData = await response.json()
let base64String = theData.data.result_b64
I’m now struggling with cloud convert, well I have that working except I cant parse the webhook it sends with Airtables limited parsing, but I guess I’ll have to loop the api calls until it returns the processed result.
Here’s how I use it: call the main “jobs” endpoint to create the job with a list of tasks (import file, convert, export new file), call the “wait” endpoint which will return when the job is finished, then retrieve the file in a final call.
Here’s how I use it: call the main “jobs” endpoint to create the job with a list of tasks (import file, convert, export new file), call the “wait” endpoint which will return when the job is finished, then retrieve the file in a final call.
Thank you Justin that was exactly the nudge I needed to get it working.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.