Background removal

Remove the background from an image

Isolates the subject of an image onto a transparent background and returns a clean PNG cutout URL, ready to use as render artwork. Costs 25 credits per image; credits are refunded automatically if processing fails.

post/api/v1/remove-background

Request

  • Base URL: https://api.sudomock.com
  • URL: https://api.sudomock.com/api/v1/remove-background
  • Auth: API key in header x-api-key

Request body

urlstring nullable

URL of the image to process (HTTP/HTTPS). Either url or base64 must be provided.

base64string nullable

Raw base64-encoded image bytes (no data: prefix). Either url or base64 must be provided.

content_typestring nullable

MIME type when using base64 field. Defaults to image/png if omitted.

idempotency_keystring nullable

Retry-stable request identifier. Required in both this field and the Idempotency-Key header for Studio calls.

Example request

{
  "url": "https://example.com/product-photo.jpg"
}

Response

Successful Response

successboolean

Success status

Example response

{
  "data": {
    "credits_charged": 25,
    "height": 3000,
    "url": "https://cdn.sudomock.com/mockup-assets/bg-cutouts/9c4e1a7f3b2d8e6045a1c93f7b20de84.png",
    "width": 2400
  },
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.