curl --location --request GET 'https://image-api.photoroom.com/v2/edit' \
--header 'x-api-key;'
{}
background.imageUrl
or background.imageFile
is provided.FF0000
, FFF
, FF0000EE
) or color name (examples: red
, blue
)removeBackground
is set to false
removeBackground
is set to false
background.imageUrl
is provided, neither background.imageFile
nor background.prompt
can be provided, and vice versa.fit
, the empty pixels will be transparentbackground.imageUrl
or background.imageFile
is providedignorePaddingAndSnapOnCroppedSides
to false
for the horizontal direction.true
(default), cropped sides of the subject will snap to the edgesremoveBackground
is set to false
imageUrl
only.imageFile
.ai.auto
, the lighting will be automatically adjustedpadding
, margin is never ignored even on cropped sides of the subject.outputSize
is originalImage
or croppedSubject
.outputSize
is originalImage
or croppedSubject
.widthxheight
for a custom size (example: 200x400
)originalImage
to keep the original image dimensionscroppedSubject
to use the size of the foreground dimensions after cropping around itmargin
, it will be ignored on cropped sides of the subject if the option is enabledsubjectBox
by default. When set to originalImage
, the padding / margin will be around the original imageremoveBackground
is set to false
fit
, the empty pixels will be transparentimageUrl
or imageFile
is providedai.soft
, a soft shadow will be generatedai.hard
, a hard shadow will be generatedai.floating
, a floating shadow will be generatedai.artificial
, artificial text will be automatically removed.ai.natural
, natural text will be automatically removed.ai.all
, all text (natural and artificial) will be automatically removed.ignorePaddingAndSnapOnCroppedSides
to false
for the vertical direction.