Developer Reference v1.0

EmmE AI Background Removal API

Integrate high-speed, neural network background removal into your applications, e-commerce stores, and workflows. Zero client key leakage and sub-second execution.

POST
/api/tools/remove-bg
99.98% SLA Availability

Request Parameters (multipart/form-data or JSON)

FieldTypeRequiredDescription
fileFile / BinaryOptional*Raw image file (PNG, JPG, JPEG, WEBP up to 15MB).
imageUrlstringOptional*Direct publicly accessible image URL.
detectionModestringNoTarget subject type: auto, people, product, animal, car, graphic.
hairDetailstringNoEdge feathering sensitivity: standard, high_quality, ultra_detail.

* Exactly one of file or imageUrl must be provided in the request payload.

curl -X POST https://emmetools.vercel.app/api/tools/remove-bg \
  -H "Content-Type: multipart/form-data" \
  -F "file=@photo.jpg" \
  -F "detectionMode=people" \
  -F "hairDetail=ultra_detail"
Response Payload (200 OK)
{
  "success": true,
  "processedImageUrl": "data:image/png;base64,iVBORw0KGgoAAA...",
  "originalFilename": "portrait.jpg",
  "fileSize": 248192,
  "width": 1920,
  "height": 1080,
  "provider": "custom_model",
  "detectionMode": "people",
  "hairDetail": "ultra_detail",
  "processingTimeMs": 420,
  "creditsRemaining": 4
}