Skip to main content
POST
Returns a transparent PNG cutout of the image subject at a URL you can hand straight to a render as artwork, along with the cutout’s pixel width and height and the credits_charged for the call. Send the image as a public url or as base64; when both are present, base64 is used.
Credits are returned automatically when an image cannot be processed. The cutout is served from a public URL for seven days, so fetch it or hand it to a render within that time rather than storing the link.

Authorizations

x-api-key
string
header
required

API key with sm_ prefix. Get your key at https://sudomock.com/dashboard/api-keys

Body

application/json

Body for POST /api/v1/remove-background.

Image source priority mirrors AssetInput: base64 > url.

url
string | null

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

base64
string | null

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

content_type
string | null

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

Pattern: ^image/(png|jpeg|webp|gif)$
idempotency_key
string | null

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

Required string length: 1 - 255

Response

200 - application/json

Successful Response

The cutout image and where to fetch it.

data
BackgroundRemovalData · object
required

The cutout image, its dimensions and the credits charged.

success
boolean
default:true

Success status