# Embed products into a scene

Try out this capability in Bria's sandbox

Description

Integrate and embed one or more products into a predefined scene at precise user-defined coordinates. 
This endpoint ensures the product matches the scene's lighting, perspective, and aesthetics.

Note on Product Cutout & Scaling: Please use Product Cutput endpoint first, to create a presice cutout of your product. Crucially, the provided coordinates (x, y, width, height) are applied to the resulting tight cutout of the product, not the original source image. To avoid stretching or distortion, developers should ensure the requested width/height matches the aspect ratio of the actual product object rather than the original canvas.

Endpoint: POST /image/edit/product/integrate

## Header parameters:

  - `api_token` (string, required)
    API token associated with the organization.

## Request fields (application/json):

  - `scene` (string, required)
    Publicly available URL or Base64-encoded image of the scene where the product will be embedded. Accepted formats are jpeg, jpg, png, webp.

  - `products` (array, required)
    An array where each object defines a product to be embedded and its specific placement within the scene. Supports 1 to N products.

  - `products.image` (string, required)
    Publicly available URL or Base64-encoded image of the product. Accepted formats are jpeg, jpg, png, webp.

Note:
- If the image contains an alpha channel, no cutout is applied.
- If the image does not contain an alpha channel, automatic product cutout is applied.

  - `products.coordinates` (object, required)
    An object specifying the exact placement and scaling of the cutout product within the scene.

  - `products.coordinates.x` (integer, required)
    X-coordinate of the cutout product's top-left corner relative to the scene image.

  - `products.coordinates.y` (integer, required)
    Y-coordinate of the cutout product's top-left corner relative to the scene image.

  - `products.coordinates.width` (integer, required)
    Target width for the tightly cropped product. Ensure this matches the product's aspect ratio to prevent distortion.

  - `products.coordinates.height` (integer, required)
    Target height for the tightly cropped product.

  - `seed` (integer)
    Seed for deterministic generation. Uses a random seed if omitted.

  - `visual_input_content_moderation` (boolean)
    If true, returns 422 on visual input moderation failure for scene or product.

  - `visual_output_content_moderation` (boolean)
    If true, returns 422 on visual output moderation failure.


