Funktioniert mein bestehender remove.bg-Code auch mit Photoroom?
Bei einem normalen Aufruf zur Entfernung des Hintergrunds: ja. Die Argumentnamen und das Antwortformat sind identisch. Du musst also nur die Endpunkt-URL und deinen API-Schlüssel ändern.
Vorher (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.jpgNachher (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.jpgWenn du weniger gängige Parameter verwendest, teste sie zuerst mit deinen eigenen Bildern. Sieh dir den Kompatibilitätsleitfaden an.
: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))