Skip to main content
Version: 2.2.0

Structure of API-request

Swagger web interface contains two API versions (v1 and v2), each of which implements two types of requests: Process Sample and Process Image.

ATTENTION!

As of version 2.0.0, the paths /process/sample and /process/image have been deprecated and are no longer supported. We strongly recommend switching to the new path format!

img.png

Process Sample

Content-Type: application/json

Path: <image_api_url>/<service_name>/<api_version>/process/sample

The request body is a sample that contains:

  • For API v1
    • $image - source image in base64 format
    • objects - processing objects (faces and bodies)
  • For API v2
    • _image
      • blob - source image in base64 format
      • format - format of encoded data, for example "IMAGE"
    • objects - processing objects (faces and bodies)

Each object has a certain set of attributes, which differs depending on the service used. In response, API returns these attributes with calculated values.

note

Fields marked with “$” and “_”, for example, $image or _image, determine that this key shows binary data encoded in base64 format.

Process Image

Content-Type: multipart/form-data

Path: <image_api_url>/<service_name>/<api_version>/process/image

The request body is an image in jpg, png or bmp.

note

This interface is not available for quality-assessment-estimator, verify-matcher, age-estimator, mask-estimator, emotion-estimator, gender-estimator, liveness-estimator, template-extractor as they require additional object attributes as input data. You can check the availability of a certain service interface in the Swagger web interface.