AI Search

Get Caption

Description

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

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

The URL of the input image. If both image_url and image_file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

file
string

The file of the input image, in base64 format. Used if image_url is not provided. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB.

Responses
200

Successful operation.

400

Bad request. Missing or invalid parameters.

401

Unauthorized. Invalid API key or authentication token.

404

Not found. Image could not be found at the provided URL.

413

Payload too large. Image file size exceeds the 12MB limit.

415

Unsupported media type. Invalid file type. Supported file types are jpeg, jpg, png, webp.

451

Unavailable for legal reasons.

460

Failed to download image.

500

Internal server error. An error occurred on the server.

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

Search by text

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.

Search will only work on images that have been onboarded using the register endpoint. Note: To use this endpoint, please contact us at support@bria.ai.

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=425
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
header Parameters
api_token
required
string
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 by Image

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.

Search will only work on images that have been onboarded using the register endpoint.

Note: To use this endpoint, please contact us at support@bria.ai.

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=425
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. The supported file types are jpg, jpeg and png, up to 12 mb.

Example: url=If you are using the vhash paramater, there is no need to use this parameter
header Parameters
api_token
required
string
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": [
    ]
}