NoBG API

Background removal you can script. Previews are free. HD costs 1 credit per image.

Sign in
Quickstart

Send an image, get a base64 PNG back.

Beta
Endpoint
POST /api/remove-background?mode=preview|hd
Content-Type: multipart/form-data
Body: file=<image>
Preview (free)
curl -sS \
  -F "file=@./input.jpg" \
  "https://nobg.dev/api/remove-background?mode=preview" \
  | jq -r '.imageBase64' \
  | base64 --decode > out.png
HD (1 credit)

For automation, use an API key in the Authorization header.

export NOBG_API_KEY="nobg_..."

curl -sS \
  -H "Authorization: Bearer $NOBG_API_KEY" \
  -F "file=@./input.jpg" \
  "https://nobg.dev/api/remove-background?mode=hd" \
  | jq -r '.imageBase64' \
  | base64 --decode > out-hd.png
Response
{
  "imageBase64": "....",
  "contentType": "image/png",
  "isHighRes": true,
  "isAuthenticated": true
}
API keys

Use keys for scripts, CI jobs, and integrations. Keys are shown once.

Sign in to generate an API key.

Sign in