Skip to main content

Remove Background

POST 

/v1/remove-background

Removes the background from an image and optionally adds AI-generated shadows. When AI shadows are requested, an additional 3 credits will be consumed.

Input Image Limits:

  • Max size: 25MB
  • Min resolution: 64x64px
  • Max resolution: 6000x6000px

Request

Header Parameters

    Accept string

    Acceptable response media type(s). application/json or image/*. Default is application/json.

Body

    image_url urlrequired

    URL of the image to be processed.

    format string

    Possible values: [png]

    The format of the resultant image. Currently, only png is supported.

    shadow

    ShadowParameter

    Enable and configure AI-generated shadow. When enabled, +3 credits are consumed. Pass true for automatic shadow estimation or provide a light source for custom control.

    enabled booleanrequired

    Enable AI shadow rendering.

    opacity float

    Possible values: <= 1

    Default value: 0.5

    Final composited shadow opacity (0–1).

    light_source

    object

    Virtual light used to synthesize the shadow. x/y are normalized to image center (-1..1); z is height above subject (0..2).

    size floatrequired

    Possible values: <= 1

    Default value: 0.3

    Apparent emitter size/softness. Higher = softer penumbra.

    position

    object

    required

    x floatrequired

    Possible values: >= -1 and <= 1

    Default value: -0.3

    y floatrequired

    Possible values: >= -1 and <= 1

    Default value: -0.6

    z floatrequired

    Possible values: <= 2

    Default value: 0.7

Responses

Success

Schema

    result_url string

    A URL to access the resultant image which is valid for 1 hour. File format will be png.

Loading...