The Bria API

We are happy to answer any questions you may have at: support@bria.ai

Introduction

The Bria API is intended for users to interact with BriEngine and perform various operations, such as generating new images, customizing uploaded images, and searching. This document will provide an overview of the API's capabilities and guide users on how to effectively implement it.

The common use of the Bria API is according to the following order:

  • /upload - By using the Upload Route, you can to upload a new image to Bria database.
  • /register - By using the Register Route, a new image can be sent to Bria without being uploaded to the database.
  • /info - By using the Info Route, you an understand the change possibilities for each object in the image. The following routes can be used if you do not require information for people, objects, and background, but rather only one of them:
    • /person/info
    • /objects/info
    • /background/info
  • /caption - By using the Caption Route, you can get a caption that describes the given image.
  • /image/generate - By using the Image Generate route, you can generate any image you would like, based on the provided prompt.

With the response from the Upload/Register Routes (visual_id), the following routes can be used without any particular order:

  • /search - Utilizing the Search Route to look for images you uploaded or registered to Bria that match a text query.
  • /search_similar_images - Utilizing the Search Similar Images Route to look for images you uploaded or registered to Bria that match the chosen image.
  • /crop - The Crop Route is used to crop an image without a background, tightly around the remaining region of interest.
  • /increase_resolution - The Increase Resolution route is used to upsacle any image.
  • /image_to_psd - The Image To Psd route is used to create a layered psd file out of any image.
  • /video - (Coming Soon) Using the Video Route to create a short video based on a single still image.

With the response from the Info Routes, the following routes can be used without any particular order:

  • /create - Using the Create Route to create a new visual with requested changes of elements according to the /info route possibilities.
  • /recast_model - Using the Recast Model Route to create a new variation of your image, while customizing a portrait to any profession/theme
  • /remove_object - Using the Remove Object Route to remove the objects from an image.
  • /remove_bg - Using the Remove BG Route to remove the background of a an image.
  • /blur_bg - Using the Blur BG Route to create a blur effect on the background of an image.
  • /replace_bg - Using the Replace BG Route to generate new backgrounds for an image.

Versioning

The current version of the web API is known as V1 and is considered to be in a draft phase. While we don’t expect public endpoints to materially change, please bear in mind that the API is still under development.

Authentication

The Bria API consists of a number of methods for uploading and creating new visual assets. The REST (representational state transfer) API methods can be called directly from within your own custom code.

curl --location --request POST 'https://engine.prod.bria-api.com/v1' \
--header: 'api_token: <...>' \
...

API Access

You can register and access the API Token through Bria's platform by clicking here.

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.

Request
Request Body schema: multipart/form-data
file
string <binary>

The file you would like to upload to Bria.

image_url
string

The URL of the file you would like to upload to Bria. The URL should lead to an image publicly available online. Either a file or an image_url should be provided. If both are provided, then the route will use image_url.

is_private
string
Default: true

The image can be included in the Bria public gallery (is_private=false) or only in the Bria gallery of your organization (is_private=true). This parameter is optional and the default value is true.

Responses
200

Successful operation.

206

File value was not provided.

208

File already uploaded.

400

Request doesn't contain file part.

405

Method not allowed.

413

Request entity too large.

415

Unsupported media type.

460

Failed to download image.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

post/upload
Request samples
Response samples
application/json
{
  • "visual_id": "string"
}

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.

Request
Request Body schema: application/json
org_image_key
string

The internal image id in your API, of the image you would like to register to Bria (without uploading it). If your images require authentication, you will need to register them using org_image_key after giving Bria the API authentication information. It is also possible to register images using an org_image_key, without any authentication data.

image_url
string

The URL of the image you would like to register to Bria. The URL should lead to an image publicly available online. Either an org_image_key or an image_url should be provided. If both are provided, then the route will use image_url. Images can only be registered using image_urls if they do not require authentication.

is_private
string
Default: true

The image can be included in the Bria public gallery (is_private=false) or only in the Bria gallery of your organization (is_private=true). This parameter is optional and the default value is true.

Responses
200

Successful operation.

208

Image already registered.

400

Bad request.

405

Method not allowed.

460

Failed to download image.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

post/register
Request samples
Response samples
application/json
{
  • "visual_id": "string"
}

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.

Request
path Parameters
visual_id
required
string

visual id of the image, received after using the /upload or /register route.

Example: 8487fb411f3c6716
query Parameters
lean
string

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'.

Responses
200

Successful operation.

205

File hasn’t finished onboarding. Please call /info again until you get 200.

400

One of the details does not meet specification. Please call /info again.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/{visual_id}/info
Request samples
Response samples
application/json
{
  • "description": "Coming Soon",
  • "scene": [
    ]
}

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.

Request
path Parameters
visual_id
required
string

visual id of the image, received after using the /upload or register route.

Example: f49943971e3039c7
Responses
200

Successful operation.

205

File hasn’t finished onboarding. Please call /info again until you get 200.

400

One of the details does not meet specification. Please call person/info again.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/{visual_id}/person/info
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

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.

Request
path Parameters
visual_id
required
string

visual id of the image, received after using the /upload or register route.

Example: f49943971e3039c7
Responses
200

Successful operation.

205

File hasn’t finished onboarding. Please call /info again until you get 200.

400

One of the details does not meet specification. Please call person/info again.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/{visual_id}/objects/info
Request samples
Response samples
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

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.

Request
path Parameters
visual_id
required
string

visual id of the image, received after using the /upload or register route.

Example: f49943971e3039c7
Responses
200

Successful operation.

205

File hasn’t finished onboarding. Please call /info again until you get 200.

400

One of the details does not meet specification. Please call person/info again.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/{visual_id}/background/info
Request samples
Response samples
application/json
{
  • "id": "67a9746d4c7939e2753869cdb4330852b6e2472b8110ae1fb59f8c033fc7fe1f",
  • "type": "background",
  • "labels": null,
  • "rect": null,
  • "actions": {
    },
  • "oracle": {
    }
}

caption

Get a caption that describes the image

Description

The Caption Route is used to get a caption that describes the given image.

Request
path Parameters
visual_id
required
string

visual id of the image for which you'd like a caption

Example: 8487fb411f3c6716
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/{visual_id}/caption
Request samples
Response samples
application/json
{
  • "results": [
    ]
}

/image/generate

Generate images using a prompt

Description

The Image Generation Route allows you to generate images based on any given text prompt.

2048 x 2048 pixels will be the size of the generated images.

Here are some examples:

prompt: alien world

style: photo realistic

atmosphere: dramatic

camera: portrait

medium: photography

results:

prompt: owl wearing a hat

style: fashion

atmosphere: vivid

camera: close up

medium: art

results:

Request
query Parameters
prompt
string

the prompt you would like to use to generate images

Example: prompt=woman traveling in the world
num_results
integer

how many images you would like to generate. The default and maximum value is 4.

Example: num_results=1
style
string

Which style you would like to see in your generated images.

Enum: "photo realistic" "fashion" "retro" "sports" "still life" "hyper realistic" "travel" "artistic" "3d render" "realistic" "fantasy" "comic book" "minimalistic"
Example: style=photo realistic
atmosphere
string

Which atmosphere you would like to get in your generated images.

Enum: "dramatic" "vivid" "warm" "cool"
Example: atmosphere=dramatic
camera
string

Which camera angle you would like to see in your generated images.

Enum: "portrait" "close up" "aerial" "landscape"
Example: camera=portrait
medium
string

Which medium should be included in your generated images.

Enum: "photography" "art"
Example: medium=photography
Responses
200

Successful operation.

400

Bad request.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

512

Insufficient resources to process the request.

create

Modify an 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.

Request
path Parameters
visual_id
required
string

visual id of the image the user wants to create a new visual from.

Example: 8487fb411f3c6716
query Parameters
sid
string

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.

Example: sid=aaeec34e-9804-11ed-a479-964fdf514767.JPEG
Request Body schema: application/json
Array of objects

The requested changes to the original visual.

Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

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.

Request
path Parameters
visual_id
required
string

visual id of the image the user wishes to customize.

Example: 8487fb411f3c6716
query Parameters
prompt
string

The profession or theme to which you would like to customize your image.

Example: prompt=superhero
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

remove_object

Remove objects from the image

Description The Remove Object Route is used to remove objects, using the object id returned in the /info or objects/info request. You can send in one request multiple objects for removal. 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.

Request
path Parameters
visual_id
required
string

visual id of the image the user wants to remove objects from.

Example: 8487fb411f3c6716
query Parameters
desired_resolution
string

The desired resolution of the updated image. This parameter is optional.

Enum: "original" "nhd" "svga" "xga" "hd" "wuxga" "uwfhd" "wqxga" "uwqhd" "uhd"
Example: desired_resolution=nhd
Request Body schema: application/json
Array of objects

The requested changes to the image. You can send in one request multiple objects for removal, each as an object in this array.

sid
string

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.

Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

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.

Request
path Parameters
visual_id
required
string

visual id of the image from which the user wishes to remove the background

Example: 8487fb411f3c6716
query Parameters
sid
string

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.

Example: sid=aaeec34e-9804-11ed-a479-964fdf514767.JPEG
desired_resolution
string

The desired resolution of the updated image. This parameter is optional.

Enum: "original" "nhd" "svga" "xga" "hd" "wuxga" "uwfhd" "wqxga" "uwqhd" "uhd"
Example: desired_resolution=nhd
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

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.

Request
path Parameters
visual_id
required
string

visual id of the image for which the background should be blurred.

Example: 8487fb411f3c6716
query Parameters
scale
integer [ 1 .. 5 ]
Default: 5

A scale for determining how blurry the background of the image should be. The options are 1, 2, 3, 4, 5. This parameter is optional.

Example: scale=4
sid
string

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.

Example: sid=aaeec34e-9804-11ed-a479-964fdf514767.JPEG
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

replace_bg

Generate a new 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 image size of the final result as well as the positioning of the product or foreground of the image.

This will enable you to create new and unique variations of your original image.

Here are some examples:

original image:

bg_prompt: environment living room interior kitchen counter

placement_type: original

num_results:

results:

bg_prompt: environment living room interior kitchen counter

placement_type: automatic

num_results: 1

canvas_size: [1200,1000]

results:

bg_prompt: environment living room interior kitchen counter

placement_type: manual_padding

num_results: 3

padding_values: [100,100,200,200]

results:

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.

Request
path Parameters
visual_id
required
string

The visual id of the image for which the user wishes to replace the background

Example: 8487fb411f3c6716
Request Body schema: application/json
bg_prompt
string

Text from which you wish to generate the new background

placement_type
string

This parameter allows you to control the positioning of the product/foreground in the image. Choosing 'original' will preserve the original position of the product/foreground in the image. Choosing 'automatic' will generate results with the 10 recommended positions for the product/foreground. Choosing 'manual_placement' will allow you to select predefined positions (using the parameter 'manual_placement_selection'). Selecting 'manual_padding' will allow you to control the position and size of the image by defining the desired padding in pixels around the product/foreground.

Enum: "original" "automatic" "manual_placement" "manual_padding"
num_results
integer
Default: 4

The number of backgrounds you would like to generate for the image. If placement_type!=original, then for each selected placement you will get results in the amount specified in this parameter.

canvas_size
Array of integers
Default: [1000,1000]

The desired size of the final image, after the replacement of the background. This parameter is only relevant when placement_type=automatic or placement_type=manual placement.

manual_placement_selection
Array of strings
Default: ["upper_left"]

If you've selected placement_type=manual placement, you should use this parameter in order to specify which placements/positions you would like to use from the list. You can select more then one placement in one request.

Items Enum: "upper_left" "upper_right" "bottom_left" "bottom_right" "right_center" "left_center" "upper_center" "bottom_center" "center_vertical" "center_horizontal"
padding_values
Array of integers
Default: [0,0,0,0]

The desired padding in pixels around the product/foreground, when using placement_type=manual_padding. The order of the values is [top, bottom, left, right].

seed
integer

You can choose whether you want your generated results to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.

sid
string

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.

Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

512

Insufficient resources to process the request.

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.

Request
path Parameters
visual_id
required
string

visual id of the image the user would like to upscale

Example: 8487fb411f3c6716
query Parameters
sid
string

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.

Example: sid=aaeec34e-9804-11ed-a479-964fdf514767.JPEG
desired_increase
integer

The resolution multiplier. The possible value are 2,4.

Example: desired_increase=2
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

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.

Request
path Parameters
visual_id
required
string

visual id of the image, for which the user would like to create a layered PSD file

Example: 8487fb411f3c6716
query Parameters
sid
string

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.

Example: sid=aaeec34e-9804-11ed-a479-964fdf514767.JPEG
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

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.

Request
path Parameters
visual_id
required
string

visual id of the image the user would like to crop

Example: 8487fb411f3c6716
query Parameters
sid
string

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.

Example: sid=aaeec34e-9804-11ed-a479-964fdf514767.JPEG
Request Body schema: application/json
padding
integer
Default: 0

Cropping the object with padding around it. Currently, padding is applied to all four borders of the remaining region. This parameter is optional.

Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

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.

Request
query Parameters
query
string

the text query for which the user is looking for matching images.

Example: query=woman traveling in the world
num_results_per_page
integer

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.

Example: num_results_per_page=1
page
integer

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. For each query, we support 800 results, so if you set num_results_per_page=50, you will have 16 pages of results.

Example: page=1
gallery_id
string

Bria will provide you with this parameter which represents your account's image gallery. You must include this parameter.

Example: gallery_id=123abc
style
string

Which style you would like to see in your results, this parameter is optional.

Enum: "stock photography" "photo realistic" "fashion" "retro" "sports" "still life" "hyper realistic" "travel" "artistic" "3d render" "realistic" "fantasy" "comic book" "minimalistic"
Example: style=photo realistic
atmosphere
string

Which atmosphere you would like to get in your results, this parameter is optional.

Enum: "dramatic" "vivid" "warm" "cool"
Example: atmosphere=dramatic
camera
string

Which camera angle you would like to see in your results, this parameter is optional.

Enum: "portrait" "close up" "aerial" "landscape"
Example: camera=portrait
medium
string

Which medium should be included in your results, this parameter is optional.

Enum: "photography" "art"
Example: medium=photography
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/search
Request samples
Response samples
application/json
{
  • "results": [
    ]
}

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.

Request
query Parameters
vhash
string

the visual id of the image for which the user is looking for similar images.

Example: vhash=e01592ef1188df76
num_results_per_page
integer

how many images you would like to receive in the current call. The default value is 50. The maximum value is 500.

Example: num_results_per_page=1
page
integer

which batch of images you would like to receive in the current call. The default value is 1. For each query, we support 800 results, so if you set num_results_per_page=50, you will have 16 pages of results.

Example: page=1
gallery_id
string

Bria will provide you with this parameter which represents your account's image gallery. You must include this parameter.

Example: gallery_id=123abc
url
string

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.

Example: url=None
Responses
200

Successful operation.

400

Bad request.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

get/search_similar_images
Request samples
Response samples
application/json
{
  • "results": [
    ]
}

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.

Request
path Parameters
visual_id
required
string

visual id of the image the user wants to create a new video from

Request Body schema: application/json
Array of objects

The requested change to the selected visual or object.

Responses
200

Successful operation.

400

Either pace or duration are required.

404

Specified Image does not exist.

405

Method not allowed.

500

Internal server error.

506

Insufficient data. The given input is not supported by the Bria API.

post/{visual_id}/video
Request samples
Response samples
application/json
{
  • "video_response": "string",
  • "confidence": "string"
}