Image Onboarding

Register 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. This is the recommended method to onboard images to Bria, when needed.

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

Constraints

Files should not be larger than 12MB. The status code 413 will be returned if the file exceeds its maximum size.

The Bria API currently supports only JPEG and PNG files in RGB, RGBA, or CMYK color modes. When the file is of a different type or color mode, the status code 415 will be returned.

Request
header Parameters
api_token
required
string
Request Body schema: application/json
required
org_image_key
string

The internal image id in your API, of the image you would like to register to Bria. If accessing your images requires authentication, you will be able to register them using org_image_key only 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 and org_image_key will be saved but not used. Images can only be registered using an image_url 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"
}

Remove Image

Description

With this route, you can remove an image from the gallery of your organization. The image won't be removed from Bria.

Request
path Parameters
visual_id
required
string
Example: b3cecc33cc31cc31
header Parameters
api_token
required
string
Responses
200

Successful operation.

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/{visual_id}/remove_image
Request samples