Skip to content

Virtual Try-On

Request

Description

Put your garments on a model. Send person_image and one to three garment_images, and the endpoint returns the person wearing them.

No prompt needed. A person photo and the garments are a complete request.

Garment fidelity is the hard half of try-on: print scale, stripe alignment across seams, collar and closure type, and how a garment reads from behind all carry through. The person's identity, pose and background are preserved, along with the original aspect ratio. Send a full outfit together to change several items in one call instead of stacking edits.

Add an optional instruction to direct the styling. Commercially safe: built on Bria's fully licensed models, cleared for enterprise use without copyright exposure.

Example: "He wears the navy blazer over the white t-shirt he already has, and the grey tailored trousers instead of his jeans."

PersonGarmentResult
Headers
api_tokenstringrequired

API token associated with the organization.

Bodyapplication/json
person_imagestringrequired

The photo of the person to edit. Publicly available URL or Base64-encoded. Accepted formats: JPEG, JPG, PNG, WEBP.

garment_imagesArray of strings, [ 1 .. 3 ] itemsrequired

One to three garment or accessory images to put on the person. Send a full outfit together to change several items in one call. Each entry is a publicly available URL or Base64-encoded, same as person_image.

instructionstring

Extra direction for this shot. This parameter is optional. The endpoint produces the result without it, so send only the detail you want to steer, for example "He wears the navy blazer over the white t-shirt he already has.", rather than a full prompt.

aspect_ratiostring

The aspect ratio of the output image. This parameter is optional. Default: the aspect ratio of person_image, so the shot keeps its original framing.

Enum:"1:1""2:3""3:2""3:4""4:3""4:5""5:4""9:16""16:9"
seedinteger

Seed for deterministic generation, so a shot can be reproduced exactly. Uses a random seed if 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.
Default:false
webhook_urlstring, (uri)

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

output_typestring

The desired output format.

Default:"png"
Enum:"png""jpeg"
visual_output_content_moderationboolean

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

Default:false
POST
/image/edit/product/virtual-tryon
curl -i -X POST \
  https://engine.prod.bria-api.com/v2/image/edit/product/virtual-tryon \
  -H 'Content-Type: application/json' \
  -H 'api_token: string' \
  -d '{
    "person_image": "https://labs-assets.bria.ai/api-examples/virtual-try-on/person.jpg",
    "garment_images": [
      "https://labs-assets.bria.ai/api-examples/virtual-try-on/garment-1.jpg",
      "https://labs-assets.bria.ai/api-examples/virtual-try-on/garment-2.jpg"
    ]
  }'

Responses

Successful operation (Synchronous Success)

Response
No content