AI Background Remover

FREEMIUM
От Firdavs Shodiyev | Обновлено 2달 전 | Artificial Intelligence/Machine Learning
Популярность

9.3 / 10

Задержка

2,864ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Image file is missing Error

Rapid account: Ajaywltest 2
ajaywltest2
24일 전

Hi there , eventhough I took the code snippet directly from rapid api , it shows error that the image file is missing. The image file is in the correct folder but still its occuring, May I know why

Here’s my code snippet:

import requests

url = “https://ai-background-remover.p.rapidapi.com/image/matte/v1

files = { “image”: “open(‘test.png’, ‘rb’)” }
headers = {
“X-RapidAPI-Key”: “123”,
“X-RapidAPI-Host”: “ai-background-remover.p.rapidapi.com
}

response = requests.post(url, files=files, headers=headers)

print(response.json())

Rapid account: Firdavscoder 1
firdavscoder1 Commented 24일 전

Try this. There is code generator on RapidAPI and you can convert into any coding languages

import requests

url = “https://ai-background-remover.p.rapidapi.com/image/matte/v1

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=“image”\r\n\r\n\r\n-----011000010111000001101001–\r\n\r\n"
headers = {
“content-type”: “multipart/form-data; boundary=—011000010111000001101001”,
“X-RapidAPI-Key”: “API_Key”,
“X-RapidAPI-Host”: “ai-background-remover.p.rapidapi.com
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии