v1

latestOpenAPI 3.1.02026-07-2419782400.4 KB
Similarity Search

Search for similar assets

Perform a similarity search for assets based on asset IDs, image URL, image data, or text query. <br><br>This endpoint uses the newer, standard UUID format of 8-4-4-4-12, and letters are lowercase. See the example for assetIds, and Note on identifiers for more information. Additionally, only one of the search parameters (assetIds, imageUrl, imageData, textQuery) should be provided per request. Providing multiple parameters will result in a 400 Bad request response. Only OAuth2 authentication is supported for this endpoint, and permanent tokens are not accepted.

post/api/1/assets/similarity-search/

Request body

assetIdsstring[]

List of asset IDs to search similar assets for.

imageUrlstring

URL of the image to find similar assets.

imageDatastring

Base64 encoded image data for similarity search.

textQuerystring

A text query describing the image for the search.

Example request

{
  "assetIds": [
    "eff9f6c7-ae77-4614-911b-fd238df5bac3",
    "5af81baa-ee0b-4611-bfa6-fd023c7989b8"
  ],
  "imageUrl": "https://d2csxpduxe849s.cloudfront.net/media/A7148429-45E9-45C9-98BABD031228C0E2/0A1C48A2-2523-440C-81DD9DFA221D28FC/webimage-5FE11596-1C5D-4FC1-9C216A240BA53979.png",
  "imageData": "data:image/jpeg;base64,...",
  "textQuery": "Image of a sunset"
}

Response

Successful response

Example response

{
  "assets": [
    {
      "assetId": "e0664bc4-4d64-4776-a010-a19d337f7ee9",
      "similarityScore": 0.98
    }
  ]
}