developer

API

Remove backgrounds programmatically. One endpoint, multipart upload, transparent PNG back.

← back to drop

Your API Key

Endpoint

POST/api/remove

Authentication

Pass your API key in every request as a Bearer token:

Authorization: Bearer bgtfo_your_key_here

Limits: 20 requests / minute · 100 requests / day

Request

Send a multipart/form-data body.

ParameterTypeRequiredDescription
fileFileyesImage file (JPG, PNG, WebP) — max 50 MB
upscalenumbernoUpscale factor applied before background removal. 0 skip (default) · 2 2× · 3 3× · 4 4×. Useful for low-res inputs where fine detail would otherwise be lost.

Response 200 OK

{
  "resultUrl": "https://cdn.bgtfo.com/results/abc123.png",
  "jobId":     "job_xyz",
  "bgMode":    "auto"
}

Download resultUrl to get the transparent PNG. The URL is valid for 24 hours.

Examples

curl -X POST https://bgtfo.com/api/remove \
  -H "Authorization: Bearer bgtfo_your_key_here" \
  -F "file=@photo.jpg" \
  -F "bgMode=auto"

Errors

StatusMeaning
400Bad request — missing file, wrong content-type, or invalid parameter value
401Unauthorized — missing or invalid API key
429Too many requests — per-minute or daily limit exceeded
502Upstream error — processing failed, safe to retry
5xxServer error — try again with exponential back-off

Limits

Rate limit20 requests / minute
Daily limit100 requests / day (UTC)
Max file size50 MB
Accepted formatsJPG · PNG · WebP
Result URL TTL24 hours

Need higher limits? get in touch