Skip to main content
POST

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

Result payload for POST /api/v1/remove-background.

success
boolean
default:true

Success status