Version 1
Connector Overview: This page documents all 18 endpoints for the Briaconnector v1.
GET
Background/info: Get info and available actions for the background of the image
Description
The Background/Info Route is used to retrieve useful information on the background of a specific visual that was previously uploaded to the database.
Additionally, it provides the available changes for the background, which are supported by the Bria API.
This route should be used instead of the main /info route when you are only interested in the available actions for the background of the image. With this route, you will save time by only obtaining information that is relevant to your needs.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image, received after using the /upload or register route. |
|
|
N/A |
GET
Blur_bg: Creates a blur effect on the background of an image
Description
The Blur BG Route is used to create a blur effect on the background of a previously uploaded image.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
This route returns both the URL and the sid associated with the updated image.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image for which the background should be blurred. |
|
|
This session id was obtained from the response of a route that had been applied to this visual id. If you have used another route on the provided visual before, and you would like the current route to modify the result of that route, please provide this information. This parameter is optional. |
|
|
N/A |
GET
Caption: Get a caption that describes the image
Description
The Caption Route is used to get a caption that describes the given image.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image for which you'd like a caption |
|
|
N/A |
POST
Create: Create a new image based on changes requested by the user
Description
The Create Route is used to create a new visual, based on the changes requested by the user for a previously uploaded visual.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
This route returns both the URL and the sid associated with the updated image.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image the user wants to create a new visual from. |
|
|
This session id was obtained from the response of a route that had been applied to this visual id. If you have used another route on the provided visual before, and you would like the current route to modify the result of that route, please provide this information. This parameter is optional. |
|
|
N/A |
POST
Crop: Crop an image around the remaining region of interest.
Description
The Crop Route is used to crop an image without a background tightly around the remaining region of interest.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
This route returns both the URL and the sid associated with the updated image.
On images without transparent backgrounds, the response will be the provided image at the selected resolution.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image the user would like to crop |
|
|
This session id was obtained from the response of a route that had been applied to this visual id. If you have used another route on the provided visual before, and you would like the current route to modify the result of that route, please provide this information. This parameter is optional. |
|
|
N/A |
POST
Image_to_psd: Create a layered PSD file from any image.
Description
The Image to PSD Route is used to create a layered PSD file from any image.
The image is divided into different layers (depending on the image): a background layer with all identified objects removed, a foreground layer without the background, and a layer for each object.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image, for which the user would like to create a layered PSD file |
|
|
This session id was obtained from the response of a route that had been applied to this visual id. If you have used another route on the provided visual before, and you would like the current route to apply on the result of that route, please provide this information. This parameter is optional. |
|
|
N/A |
GET
Increase_resolution: Increase image resolution
Description
The Increase Resolution Route is used to upsacle the resolution of any image.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
PNG files with transparency are not supported by this feature at the moment.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image the user would like to upscale |
|
|
This session id was obtained from the response of a route that had been applied to this visual id. If you have used another route on the provided visual before, and you would like the current route to apply on the result of that route, please provide this information. This parameter is optional. |
|
|
The resolution multiplier. The possible value are 2,4. |
|
|
N/A |
GET
Info: Get image info and available actions
Description
The Info Route is used to retrieve useful information on a specific visual that was previously uploaded to the database.
Additionally, it provides a description of each object and element within the scene along with its available changes, which are supported by the Bria API.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image, received after using the /upload or /register route. |
|
|
Set the value 'true' for this parameter if you wish to receive only the high-level information (currently, this means only the description, org_height, and org_width) from the info route. This parameter is optional and as default the value is 'false'. |
|
|
N/A |
GET
Objects/info: Get info and available actions for the objects in the image
Description
The Objects/Info Route is used to retrieve useful information on the objects in a specific visual that was previously uploaded to the database.
Additionally, it provides a description of each object within the scene along with its available changes, which are supported by the Bria API.
This route should be used instead of the main /info route when you are only interested in information and available actions for the objects in the image. With this route, you will save time by only obtaining information that is relevant to your needs.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image, received after using the /upload or register route. |
|
|
N/A |
GET
Person/info: Get info and available actions for the people in the image
Description
The Person/Info Route is used to retrieve useful information on the people in a specific visual that was previously uploaded to the database.
Additionally, it provides a description of each person within the scene along with its available changes, which are supported by the Bria API.
This route should be used instead of the main /info route when you are only interested in information and available actions for the people in the image. With this route, you will save time by only obtaining information that is relevant to your needs.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image, received after using the /upload or register route. |
|
|
N/A |
POST
Recast_model: Customize a portrait to any profession/theme
Description
The Recast Model Route is used to create customized and eye-catching images of people that match various themes or professions by modifying their outfit, body structure, hair, and background.
This provides an easy and quick way to generate high-quality visuals for businesses, creative projects, or personal use without the need for extensive photography or design work.
The feature is also fun and engaging for social media or entertainment purposes, allowing users to create custom avatars or profile pictures that reflect their personality.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
This route returns both the URL and the sid associated with the updated image.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image the user wishes to customize. |
|
|
The profession or theme to which you would like to customize your image. |
|
|
N/A |
POST
Register: Register an image
Description
A new visual can be registered to Bria without being uploaded to the database using the Register Route.
This route returns a visual identification to the user.
It's the first step for consuming the Bria API for new visuals (instead of using the /upload route).
Response
The visual id in the response of the Register Route must be kept by the
user in order to query image info, modify the image and use the search routes.
{ "visual_id": "9ea9a4d2d19977a7c" }
The visual_id in the response of the /upload route will be used for all other routes. Store the visual_id in your database and map it to your image identification method for easy reference
Bria generative Web tool
The registered visual can be seen and used in the Bria generative web tool in cases where the tool is licensed as part of the project.
To do so, the user can access the following url: ``https://labs.bria.ai/tools/{visual_id}``, where the {visual_id} comes from the response of the /register route.
In Bria's web tool, the user has the ability to make many changes to the visual and also generate live videos, using an intuitive interactive platform.
Bria's web tool can also be embedded in other websites, with the use of an iframe HTML element:
Constraints
Bria API currently only supports JPEG and PNG files, which are not larger than 12MB.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET
Remove_bg: Remove the background of an image
Description
The Remove BG Route is used to remove the background of a previously uploaded image.
You can also use this route on a modified image by providing the sid from the response of the previously used route.
This route returns both the URL and the sid associated with the updated image.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image from which the user wishes to remove the background |
|
|
This session id was obtained from the response of a route that had been applied to this visual id. If you have used another route on the provided visual before, and you would like the current route to modify the result of that route, please provide this information. This parameter is optional. |
|
|
The desired resolution of the updated image. This parameter is optional. |
|
|
N/A |
POST
Replace_bg: Replace the background of an image
Description
The Replace BG Route is used to replace the background of a previously uploaded image, with a generated background.
Additionally, you can change the canvas size of the final result as well as the positioning of the product or foreground. This will enable you to create new and unique variations of your original image.
You can use this route on a modified image by providing the sid from the response of the previously used route.
This route returns both the URL and the sid associated with the updated image.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image for which the user wishes to replace the background |
|
|
N/A |
GET
Search: Search for images matching the given text query
Description
By using the Search Route, you can utilize Bria's generative search capabilities, which don't require labels or keywords.
The user can send any text query and receive relevant images that match the query.
The Search Route returns the images, sorted by the match score, from highest match to lowest match.
The images are returned in batches, and you can specify how many images to receive in one batch, and which batch to receive in each call.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
the text query for which the user is looking for matching images. |
|
|
Make sure this parameter is always set to true. |
|
|
Make sure this parameter is set to true if you wish to get search results from your gallery. The default value is true. |
|
|
how many images you would like to receive from the gallery search. The default value is 50. The maximum value is 500. No need to use this parameter when gallery_search=false. |
|
|
Make sure this parameter is set to true if you wish to get synthetic, generated results. The default value is false. With gallery_search=true and synthetic_search=true, you will get both types of results, and the first few will be synthetic. |
|
|
how many synthetic images you would like to receive. The default value is 4. The maximum value is 4. No need to use this parameter when synthetic_search=false. |
|
|
which batch of images you would like to receive in the current call. Synthetic results will only be included in page no. 1. The default value is 1. |
|
|
Bria will provide you with this parameter which represents your account's image gallery. You must include this parameter. |
|
|
Which style you would like to see in your results, this parameter is optional. |
|
|
Which atmosphere you would like to get in your results, this parameter is optional. |
|
|
Which camera angle you would like to see in your results, this parameter is optional. |
|
|
Which medium should be included in your results, this parameter is optional. |
|
|
N/A |
GET
Search_similar_images: Search for images matching the given image
Description
By using the Search Similar Images Route, you can send an image as a query and receive relevant images that are similar.
The Search Similar Images Route returns the images, sorted by the similarity score, from the highest to the lowest.
The images are returned in batches, and you can specify how many images to receive in one batch, and which batch to receive in each call.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
the visual id of the image for which the user is looking for similar images. |
|
|
how many images you would like to receive in the current call. The default value is 50. The maximum value is 500. |
|
|
which batch of images you would like to receive in the current call. The default value is 1. |
|
|
Bria will provide you with this parameter which represents your account's image gallery. You must include this parameter. |
|
|
URL of an image, for which you would like to find similar images. When you want to search based on modified images, or images that have not been uploaded or registered to Bria, you can use this parameter. When this parameter is provided, the visual_id parameter can be None. |
|
|
N/A |
POST
Upload: Upload a file
Description
The Upload Route is used to upload visuals to the database.
This route returns a visual identification to the user. It's the first step for consuming the Bria API for new visuals.
Response
The visual id in the response of the Upload Route must be kept by the
user in order to query image info, modify the image and use the search routes.
{ "visual_id": "9ea9a4d2d19977a7c" }
The visual_id in the response of the /upload route will be used for all other routes. Store the visual_id in your database and map it to your image identification method for easy reference
Bria generative Web tool
The uploaded visual can be seen and used in the Bria generative web tool in cases where the tool is licensed as part of the project.
To do so, the user can access the following url: ``https://labs.bria.ai/tools/{visual_id}``, where the {visual_id} comes from the response of the /upload route.
In Bria's web tool, the user has the ability to make many changes to the visual and also generate live videos, using an intuitive interactive platform.
Bria's web tool can also be embedded in other websites, with the use of an iframe HTML element:
Constraints
Files should not be larger than 12MB. The status code 413 will be returned if the file exceeds its maximum size.
Bria API currently only supports JPEG and PNG files. The status code 415 will be returned if the file is of a different type.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
POST
Video (Coming Soon): Generate a video from a still image
Description
The Video Route is used to create a new video, based on a previously uploaded single still image.
This route can also be used on an image that has been changed by the user using the /create route.
The Video Route will return the URL for accessing the new generated video and the confidence that Bria has in the quality of this video.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
visual id of the image the user wants to create a new video from |
|
|
N/A |