AI Background Remover

フリーミアム
よって Firdavs Shodiyev | 更新済み एक महीने पहले | Artificial Intelligence/Machine Learning
人気

9.2 / 10

レイテンシー

2,606ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

Image file is missing Error

Rapid account: Ajaywltest 2
ajaywltest2
17 दिन पहले

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 17 दिन पहले

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

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿