Mã remove.bg hiện tại của tôi có dùng được với Photoroom không?
Với một yêu cầu xóa nền thông thường thì đúng vậy. Tên các tham số và định dạng phản hồi giống nhau, nên bạn chỉ cần thay đổi URL endpoint và khóa API.
Trước đây (remove.bg):
curl -H 'x-api-key: YOUR_REMOVE_BG_API_KEY' \
-f https://api.remove.bg/v1.0/removebg \
-F 'image_file=@/absolute/path/to/image.jpg' \
-F 'crop=true' \
-F 'bg_color=FFFFFF' \
-F 'format=jpg' \
-F 'size=hd' \
-o result.jpgSau (Photoroom):
curl -H 'x-api-key: YOUR_PHOTOROOM_API_KEY' \
-f https://sdk.photoroom.com/v1/segment \
-F 'image_file=@/absolute/path/to/image.jpg' \
-F 'crop=true' \
-F 'bg_color=FFFFFF' \
-F 'format=jpg' \
-F 'size=hd' \
-o result.jpgNếu bạn truyền các tham số ít phổ biến hơn, hãy thử chúng trên ảnh của bạn trước. Xem hướng dẫn tương thích.
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))
:no_upscale():format(webp))