Remove Image Background
curl --request POST \
--url https://api.example.com/image/remove-background \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"destination": "bunny-prod",
"metadata": {},
"output": {},
"webhook": {
"custom": [
{
"url": "<string>"
}
],
"dashboard": true
}
}
'import requests
url = "https://api.example.com/image/remove-background"
payload = {
"url": "<string>",
"destination": "bunny-prod",
"metadata": {},
"output": {},
"webhook": {
"custom": [{ "url": "<string>" }],
"dashboard": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
destination: 'bunny-prod',
metadata: {},
output: {},
webhook: {custom: [{url: '<string>'}], dashboard: true}
})
};
fetch('https://api.example.com/image/remove-background', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/image/remove-background",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'destination' => 'bunny-prod',
'metadata' => [
],
'output' => [
],
'webhook' => [
'custom' => [
[
'url' => '<string>'
]
],
'dashboard' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/image/remove-background"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"destination\": \"bunny-prod\",\n \"metadata\": {},\n \"output\": {},\n \"webhook\": {\n \"custom\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"dashboard\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/image/remove-background")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"destination\": \"bunny-prod\",\n \"metadata\": {},\n \"output\": {},\n \"webhook\": {\n \"custom\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"dashboard\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/image/remove-background")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"destination\": \"bunny-prod\",\n \"metadata\": {},\n \"output\": {},\n \"webhook\": {\n \"custom\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"dashboard\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"estimatedCost": "0.03",
"taskId": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP",
"access": {
"publicAccessToken": "pat_eyJhbGciOi..."
}
}
}{
"success": false,
"error": [
"<unknown>"
],
"data": "<unknown>"
}Image
Remove Image Background
POST
/
image
/
remove-background
Remove Image Background
curl --request POST \
--url https://api.example.com/image/remove-background \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"destination": "bunny-prod",
"metadata": {},
"output": {},
"webhook": {
"custom": [
{
"url": "<string>"
}
],
"dashboard": true
}
}
'import requests
url = "https://api.example.com/image/remove-background"
payload = {
"url": "<string>",
"destination": "bunny-prod",
"metadata": {},
"output": {},
"webhook": {
"custom": [{ "url": "<string>" }],
"dashboard": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
destination: 'bunny-prod',
metadata: {},
output: {},
webhook: {custom: [{url: '<string>'}], dashboard: true}
})
};
fetch('https://api.example.com/image/remove-background', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/image/remove-background",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'destination' => 'bunny-prod',
'metadata' => [
],
'output' => [
],
'webhook' => [
'custom' => [
[
'url' => '<string>'
]
],
'dashboard' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/image/remove-background"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"destination\": \"bunny-prod\",\n \"metadata\": {},\n \"output\": {},\n \"webhook\": {\n \"custom\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"dashboard\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/image/remove-background")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"destination\": \"bunny-prod\",\n \"metadata\": {},\n \"output\": {},\n \"webhook\": {\n \"custom\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"dashboard\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/image/remove-background")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"destination\": \"bunny-prod\",\n \"metadata\": {},\n \"output\": {},\n \"webhook\": {\n \"custom\": [\n {\n \"url\": \"<string>\"\n }\n ],\n \"dashboard\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"estimatedCost": "0.03",
"taskId": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP",
"access": {
"publicAccessToken": "pat_eyJhbGciOi..."
}
}
}{
"success": false,
"error": [
"<unknown>"
],
"data": "<unknown>"
}Authorizations
apiKeyAuthoauthAuth
Mynth API key sent as Authorization: Bearer <api-key>.
Body
application/json
Controls whether the create-task response should include a short-lived Public Access Token.
That token can be passed to browser or client-side code for polling task status and task images without exposing your API key.
Show child attributes
Show child attributes
Required string length:
1 - 64Example:
"bunny-prod"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Image background removal task created
Show child attributes
Show child attributes