Skip to content

Embed products into a scene

Request

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.

Headers
api_tokenstringrequired

API token associated with the organization.

Bodyapplication/json
scenestringrequired

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

productsArray of objects, non-emptyrequired

An array where each object defines a product to be embedded and its specific placement within the scene. Supports 1 to N products.

seedinteger

Seed for deterministic generation. Uses a random seed if omitted.

visual_input_content_moderationboolean

If true, returns 422 on visual input moderation failure for scene or product.

Default:true
visual_output_content_moderationboolean

If true, returns 422 on visual output moderation failure.

Default:true
POST
/image/edit/product/integrate
curl -i -X POST \
  https://engine.prod.bria-api.com/v2/image/edit/product/integrate \
  -H 'Content-Type: application/json' \
  -H 'api_token: string' \
  -d '{
    "scene": "string",
    "products": [
      {
        "image": "string",
        "coordinates": {
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0
        }
      }
    ],
    "seed": 0,
    "visual_input_content_moderation": true,
    "visual_output_content_moderation": true
  }'