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.
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!
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)
- _image
Each object has a certain set of attributes, which differs depending on the service used. In response, API returns these attributes with calculated values.
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.
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.