Camera Search API

Overview

Camera Search API provides similar product recommendations based on an input image.

Endpoint

We currently support two LENS API versions

Version 1.1:

Version 1.2: Recommended for new LENS users

POST /

Request

Name

Description

Content-Type

application/json

x-api-key

API Key for authentication from Omnious [Required]

Body

Name

Type

Required

Description

image

object

O

Object containing image type and content depending on image type

image.type

String

O

Requested image type (url or base64)

image.content

String

O

Requested image contents depending on type

if url: URL of the requested image

if base64: requested image encoded in base64 A prefix is required for the base64 string. Please see below the chart for details.

limit

Integer

X

Maximum number of items to recommend

  • default: 10

  • max: 500

weightColorFeature

String

X

Weight of color to be reflected in recommendations

  • default: MEDIUM

  • Selectable from the following values

    • LOW

    • MEDIUM

    • HIGH

showContext

Bool

X

Whether to display context information

  • default: false

showImageInfo

Bool

X

Whether to display image information

  • default: false


Updating images with base64 type:

  • Prefix "data:image/{image ext};base64," is required for base64 encoded string

base64 python code example

Request Example

Example 1. Search by Base64 (without context information)

Example 2. Search by URL (without context information)

Example 3. Search by Base64 (with context and image information)

Response

Return recommended products in order of similarity.

HTTP Status Code

Code

Description

403

API KEY authentication related error

400

Input Data Validation related error

200

Success response with zero recommendation results

201

Success response with one or more recommendation results

500

Server error

Response Body

Name

Type

Description

status

String

“ok” if success

error

Object

returns null if no Error

If Error it takes the below format

  • error.code: Error Code defined in the Error menu

  • error.message: Error Message

data

String

Please refer to the Response Data section below

Response Data

Name

Type

Description

image

object

Object containing the image type and content depending on image type

image.type

String

Requested image type (url or base64)

image.content

String

Requested image contents depending on type

if url: URL of the requested image

if base64: requested image encoded in base64

limit

Integer

Maximum number of items to recommend

  • default: 10

  • max: 500

weightColorFeature

String

Weight of color to be reflected in recommendations

  • default: MEDIUM

  • Selectable from the following values

    • LOW

    • MEDIUM

    • HIGH

showContext

Bool

Whether to display context information

  • default: false

showImageInfo

Bool

Whether to display image information

  • default: false

detection

Array

(Reserved) currently only returns null

results

Array of Object

Detected product recommendations

Response Data > Results

Name

Type

Description

id

String

The ID of the detected product.

category

String

Category Information about the detected Product

bbox

Array[4]

Bounding Area of the Detected Product. Takes values between 0~1. Numbers are in the following order

[top, left, width, height]

recommendation

Array of Object

Please Refer to the Recommendation section Below

Category of Detected Products

Field

Description

SHOES

shoes

BAGS

bags

HATS

hats

GLASSES

glasses, sun-glasses

BELTS

belts

WATCHES

watch

TOPS

tops (blouses, shirts, knitwear, etc)

OUTWEARS

coats, jackets, jumpers, paddings, etc

SKIRTS

skirts

PANTS

pants

WHOLEBODIES

dresses, jumpsuits

JEWELRIES

jewelry (rings, necklaces, etc)

ACCESSORIES

accessories

Response Data > Results > Recommendation

Name

Type

Description

id

String

Product code to recommend

url

String

Recommended product information url

context

Object

Context information inserted in Data Management API

imageInfo

Object

Image information entered in Data Management API

(Detection information, Image URL)

null if showImageInfo is false

imageInfo.detection

String

Detection information of the product

imageInfo.content

String

The url of the product image used in the analysis

Example Response

Example 1. Search by Image URL

  • context, imageInfo not included

  • limit is set to 10 (default)

Example 2. Search by Base64 Encoding

  • context, imageInfo field not included

  • limit is set to 10 (default)

Last updated

Was this helpful?