โค้ด remove.bg ที่คุณมีอยู่จะใช้กับ Photoroom ได้ไหม?
สำหรับการเรียกใช้ API เพื่อลบฉากหลังแบบมาตรฐาน ใช่ ชื่ออาร์กิวเมนต์และรูปแบบการตอบกลับเหมือนกัน คุณจึงเปลี่ยนแค่ URL ของ endpoint และ API key
ก่อน (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.jpgหลังใช้ 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.jpgหากคุณส่งพารามิเตอร์ที่ไม่ค่อยพบ ให้ทดสอบกับรูปภาพของคุณเองก่อน ดูคู่มือความเข้ากันได้
: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))