Products

Try out this capability in Bria's sandbox

Description

Place your product in a new scene. Send one product photo and a prompt describing the scene, and the endpoint returns a new photo of the product in that scene.

The shot keeps the photo's framing and aspect ratio, at about one megapixel. There is no placement, aspect ratio or size to set.

By default the product is redrawn as part of the scene. When it must stay pixel-exact, for example to keep small label text, set preserve_product to true: the product from your photo is pasted back over the shot, and the shot comes back at your photo's resolution when the photo is larger, up to 25 megapixels. If the product moved in the shot, nothing is pasted back and the shot comes back as generated. product_preserved in the response says which happened.

Commercially safe: built on Bria's fully licensed models, cleared for enterprise use without copyright exposure.

Example: "Place this perfume bottle on a wet black slate ledge by a rain-streaked window at dusk, lit by a warm lamp from the left."

<table> <tr> <th style="text-align: center;">Product</th> <th style="text-align: center;">Result</th> </tr> <tr> <td align="center" style="vertical-align: middle;"> <img src="https://labs-assets.bria.ai/api-examples/product-lifestyle-shot/product.jpg" width="250" style="border-radius: 8px;"> </td> <td align="center" style="vertical-align: middle;"> <img src="https://labs-assets.bria.ai/api-examples/product-lifestyle-shot/result.jpg" width="250" style="border-radius: 8px;"> </td> </tr> </table>
post/image/edit/product/lifestyle_shot

Request

  • Base URL
    https://engine.prod.bria-api.com/v2
  • Auth
    API key in header api_token

Request body

imagestring required

The product photo. Publicly available URL or Base64-encoded. Accepted formats: JPEG, JPG, PNG, WEBP.

promptstring required

The scene to place the product in, in free text: what it stands on, what surrounds it and how it is lit. Prompts in other languages are translated to English.

preserve_productboolean

Paste the product from your photo back over the shot, so its pixels are your photo's, and return the shot at your photo's resolution when the photo is larger, up to 25 megapixels. This parameter is optional. Skipped when the product moved in the shot, which then comes back as generated. product_preserved in the response says which happened.

seedinteger

Seed for reproducible output. A random seed is used when omitted. This parameter is optional.

syncboolean

Specifies the response mode. This parameter is optional.

  • When false (default), the request is processed asynchronously: the API immediately returns a status URL to track progress.
  • When true, the request is processed synchronously: the API holds the connection open until the process is complete and then returns the final image URL in the response.
webhook_urlstring uri

Optional URL for receiving the result via webhook when the async job completes. See webhooks.

output_type'png' | 'jpeg'

The desired output format.

prompt_content_moderationboolean

If true, returns 422 when the prompt fails content moderation. This parameter is optional.

visual_input_content_moderationboolean

If true, returns 422 when the product photo fails content moderation. This parameter is optional.

visual_output_content_moderationboolean

If true, returns 422 on visual output moderation failure. This parameter is optional.

Response

Successful operation (Synchronous Success)

request_idstring required

Changes