Cloud API
Synopsis¶
In order to deliver an easy-to-use means for IDLive Doc evaluation, ID R&D provides cloud API for the IDLive Doc REST API. Access to the cloud API is controlled via API keys provided by ID R&D. Cloud API is available on the following base URL: https://idlivedoc-rest-api.idrnd.net
. You can find basic API usage example at the right panel. For the further usage instructions please refer to the IDLive Doc Server API documentation section.
Available endpoints¶
Path | Description | HTTP Method |
---|---|---|
/check_liveness_file | Document liveness check using a single image (file upload) | POST |
/check_liveness | Document liveness check using a single image (JSON body) | POST |
/api_version | Backend deployment description (SDK version, available pipelines etc.) | GET |
/v3/api-docs | OpenAPI specification, can be used for client generation (e.g. by importing to Postman) | GET |
Usage example¶
Below is a sample /check_liveness
request to IDLive Doc Cloud API using curl
command line utility:
(echo -n '{
"image": "'; base64 image.png; echo '",
"pipelines": [
{"pipeline_name": "default-sr"},
{"pipeline_name": "default-pc"},
{"pipeline_name": "default-ps", "calibration": "HARD"}
]
}') | \
curl -H "x-api-key: <API-key>" \
-H "Content-Type: application/json" \
-X POST -d @- https://idlivedoc-rest-api.idrnd.net/check_liveness
The same can be achieved using the /check_liveness_file
API endpoint which supports direct file upload:
curl -H "x-api-key: <API-key>" -F file=@/data/image0.png -X POST \
https://idlivedoc-rest-api.idrnd.net/check_liveness_file?pipelines=default-sr,default-pc,default-ps&calibrations=REGULAR,REGULAR,HARD