Pro Model Documentation#

REST API reference for cloud-hosted background removal, alpha matte extraction, and the dedicated car pipeline (including uncomposited cutout + shadow layers). Managed infrastructure at api.withoutbg.com, billed per image.

Quickstart#

  1. Get an API key. Sign up (50 free credits, no credit card), then copy the key from your account.
  2. Send an image.

    Remove a background

    curl -X POST https://api.withoutbg.com/v1.0/image-without-background \
      -H "X-API-Key: $WITHOUTBG_API_KEY" \
      -F "file=@photo.jpg" \
      -o cutout.png
  3. Use the result. cutout.png is a transparent RGBA PNG. Each HTTP 200 costs 1 credit.

Binary or Base64? Binary endpoints take multipart/form-data and return image bytes: use them from servers, CLIs and file pipelines. Base64 endpoints take and return JSON: use them from browsers, serverless functions and JSON-only pipelines.

Endpoints#

Errors and limits#

Every endpoint returns these status codes on failure. Failed calls cost no credits.

StatusMeaning
401Invalid API Key
402Insufficient credit. Please top up API credits.
403Credits Expired. Please top up API credits. If you have existing credits, they will be reactivated.
413File size too large. Maximum file size is 20.0 MB.
415Unsupported Media Type. Supported formats are: JPEG, PNG, WebP, AVIF, HEIC, TIFF, BMP, GIF.
422Validation Error
429Rate limit exceeded (product policy: 30 requests/minute per API key). May be returned by the API gateway. Retry with exponential backoff.
500Internal Server Error
LimitValue
Rate limit (product)30 requests/minute per API key (gateway may return 429)
Max input size20.0 MB: binary: HTTP 413; base64: HTTP 422
Unsupported formatBinary: HTTP 415; base64: HTTP 422
Prep downscaleLongest side > 5000 px or > 25 MP → auto-downscale (not rejected)
Paid call cost1 credit on HTTP 200 (credits endpoint is free)
Inference sizeMax ~1024 px on the longer side; matte/cutout mapped back to full-res RGB. Edge detail is capped at inference resolution.