API Documentation
APIImage To ImageProduct Photo

Product Photo

API documentation and implementation examples for the Product Photo model.

Part of the Image To Image / Product collection

API Endpoint

/v1/image-to-image/product

Request Parameters

prompt(Required)string

Text prompt to guide the image processing

Example:[ "Place this product on a white background" ]
image_url(Required)string

URL of the product image to be processed

Example:[ "https://example.com/images/product123.jpg" ]
padding_valuesobject

Custom padding values for manual padding placement

topinteger

Top padding in pixels

leftinteger

Left padding in pixels

rightinteger

Right padding in pixels

bottominteger

Bottom padding in pixels

placement_typestring

Method for determining how the product is placed on the background

Example:[ "automatic" ]
Enum:[ "original", "automatic", "manual_placement", "manual_padding" ]
background_image_urlstring

Optional URL for a custom background image

Example:[ "https://example.com/backgrounds/white_marble.jpg" ]
manual_placement_selectionstring

Specific position to place the product when using manual placement

Example:[ "center_horizontal" ]
Enum:[ "upper_left", "upper_right", "bottom_left", "bottom_right", "right_center", "left_center", "upper_center", "bottom_center", "center_vertical", "center_horizontal" ]

Code Examples

Response Example

Response Fields

seed(Required)integer

Seed value used for the generation

images(Required)array [object]

Array of generated images

Array items:
[item]object
urlstring

URL of the generated image

widthinteger

Width of the image in pixels

heightinteger

Height of the image in pixels

file_datastring

Base64-encoded image data (if applicable)

file_namestring

Name of the image file

file_sizeinteger

Size of the image file in bytes

content_typestring

Content type/MIME type of the image

prompt(Required)string

The prompt used to generate the images

has_nsfw_concepts(Required)array [boolean]

Array indicating whether each image contains NSFW concepts