Cut out an object with MultiMatte
curl --request POST \
--url https://api.feyn.ai/v1/cutout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_base64": "<string>",
"model": "multimatte",
"prompt": "the dog"
}
'import requests
url = "https://api.feyn.ai/v1/cutout"
payload = {
"image_base64": "<string>",
"model": "multimatte",
"prompt": "the dog"
}
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({image_base64: '<string>', model: 'multimatte', prompt: 'the dog'})
};
fetch('https://api.feyn.ai/v1/cutout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}Models
Cut out an object with MultiMatte
Send a base64 photo and name the object to keep; get a transparent PNG back. Also served at /multimatte/v1/cutout.
POST
/
v1
/
cutout
Cut out an object with MultiMatte
curl --request POST \
--url https://api.feyn.ai/v1/cutout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_base64": "<string>",
"model": "multimatte",
"prompt": "the dog"
}
'import requests
url = "https://api.feyn.ai/v1/cutout"
payload = {
"image_base64": "<string>",
"model": "multimatte",
"prompt": "the dog"
}
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({image_base64: '<string>', model: 'multimatte', prompt: 'the dog'})
};
fetch('https://api.feyn.ai/v1/cutout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error"
}
}Body
application/json
Response
An RGBA PNG at the input size (after any downscale).
The response is of type file.
⌘I