AI Background Remover

फ्रीमियम
द्वारा Firdavs Shodiyev | अपडेट किया गया 2 months ago | 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 days ago

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 days ago

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())

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें