Download OpenAPI specification:Download
VisionLabs Luna Platform 5 API. The API version is 6.
OpenAPI specification is the only valid document providing up-to-date information about the service API.
The specification can be used:
All the documents and code generated using this specification can include inaccuracies and should be carefully checked.
OpenAPI specification can be received using the /docs/spec resource. The "Accept" header should be set to "application/x-yaml".
Get versions of services.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "LUNA PLATFORM": {
- "major": 0,
- "minor": 0,
- "patch": 0
}, - "luna-api": {
- "api": 5,
- "major": 3,
- "minor": 1,
- "patch": 2
}, - "luna-events": {
- "api": 1,
- "major": 1,
- "minor": 0,
- "patch": 5
}, - "luna-faces": {
- "api": 2,
- "major": 2,
- "minor": 3,
- "patch": 9
}, - "luna-image-store-bodies-samples": {
- "api": 1,
- "major": 2,
- "minor": 1,
- "patch": 11
}, - "luna-image-store-faces-samples": {
- "api": 1,
- "major": 2,
- "minor": 1,
- "patch": 10
}, - "luna-image-store-images": {
- "api": 1,
- "major": 2,
- "minor": 1,
- "patch": 13
}, - "luna-handlers": {
- "api": 1,
- "major": 1,
- "minor": 0,
- "patch": 0
}, - "luna-tasks": {
- "api": 1,
- "major": 1,
- "minor": 0,
- "patch": 13
}, - "luna-matcher-proxy": {
- "api": 1,
- "major": 1,
- "minor": 0,
- "patch": 0
}, - "luna-remote-sdk": {
- "api": 1,
- "major": 1,
- "minor": 0,
- "patch": 0
}, - "luna-lambda": {
- "api": 1,
- "major": 1,
- "minor": 0,
- "patch": 0
}
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
get accounts
page | integer >= 1 Default: 1 Page number. |
page_size | integer [ 1 .. 1000 ] Default: 10 Number of items on page. |
login | string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$ Example: login=user@visionlabs.ru account login |
account_type | string (account_type) Enum: "advanced_user" "user" "admin" Example: account_type=user account type |
create_time__lt | string <date-time> (time) Example: create_time__lt=2018-08-11T09:11:41.674Z Upper bound for object create_time. |
create_time__gte | string <date-time> (time) Example: create_time__gte=2018-08-11T09:11:41.674Z Lower included bound for object create_time. |
targets | string Default: ["account_id","login","account_type","description","create_time","last_update_time"] Enum: "account_id" "login" "account_type" "description" "create_time" "last_update_time" Example: targets=login Comma-separated list of account target fields. Available targets: account_id, login, account_type, description, create_time, last_update_time |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" url = f"{baseUri}/accounts" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=" } response = requests.get(url, headers=headers) print(response.status_code) print(response.json())
{- "accounts": [
- {
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "login": "mylogin@gmail.com",
- "account_type": "advanced_user",
- "description": "main admin account",
- "create_time": "2018-08-11T09:11:41.674Z",
- "last_update_time": "2018-08-11T09:11:41.674Z"
}
], - "total_count": 50
}
Create an account.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type | string Value: "application/json" Content type is |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID for new account creation. |
login required | string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$ Account email. |
password required | string (password) [ 3 .. 128 ] characters ^.{3,128}$ Account password. |
account_type required | string (account_type_for_creation) Enum: "advanced_user" "user" Specified user account type:
|
description | string (account_description) <= 128 characters Default: "" Account description. |
{- "login": "mylogin@gmail.com",
- "password": "string",
- "account_type": "advanced_user",
- "description": "main admin account"
}
{- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/6/account",
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Get account.
targets | string Default: ["account_id","login","account_type","description","create_time","last_update_time"] Enum: "account_id" "login" "account_type" "description" "create_time" "last_update_time" Example: targets=login Comma-separated list of account target fields. Available targets: account_id, login, account_type, description, create_time, last_update_time |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" url = f"{baseUri}/account" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=" } response = requests.get(url, headers=headers) print(response.status_code) print(response.json())
{- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "login": "mylogin@gmail.com",
- "account_type": "advanced_user",
- "description": "main admin account",
- "create_time": "2018-08-11T09:11:41.674Z",
- "last_update_time": "2018-08-11T09:11:41.674Z"
}
Patch account. At least one field must be specified.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Content-Type | string Value: "application/json" Content type is |
login | string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$ Account email. |
password | string (password) [ 3 .. 128 ] characters ^.{3,128}$ Account password. |
account_type | string (account_type_for_creation) Enum: "advanced_user" "user" Specified user account type:
|
description | string (account_description) <= 128 characters Default: "" Account description. |
{- "login": "mylogin@gmail.com",
- "password": "string",
- "account_type": "advanced_user",
- "description": "main admin account"
}
{- "error_code": 12022,
- "desc": "Bad/incomplete input data",
- "detail": "Failed to validate input json. Path: 'extra_field', message: 'extra fields not permitted'"
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Create a token.
grant_all_permissions | integer Default: 0 Enum: 0 1 Grant all permissions to token. 1 - give, 0 - do not give.
If value is Grant only standart permissions. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Content-Type | string Value: "application/json" Content type is |
required | object token permissions * it is possible to use custom fields for permissions besides those given here custom fields must have 3-16 characters (lowercase letters, _) with possible permissions:
|
description | string (token_description) <= 128 characters Default: "" Token description. |
expiration_time required | string or null <date-time> Token expiration time in RFC 3339 format. |
visibility_area | string (visibility_area) Default: "all" Enum: "account" "all" Specifies data visible for the token.
|
{- "description": "main account token",
- "expiration_time": "2050-11-11T11:11:11.111+03:00",
- "permissions": {
- "face": [
- "creation",
- "view",
- "modification",
- "deletion",
- "matching"
], - "list": [
- "creation",
- "view",
- "modification",
- "deletion"
], - "event": [
- "creation",
- "view",
- "matching"
], - "attribute": [
- "creation",
- "view",
- "modification",
- "deletion",
- "matching"
], - "handler": [
- "creation",
- "view",
- "modification",
- "deletion"
], - "verifier": [
- "creation",
- "view",
- "modification",
- "deletion"
], - "task": [
- "creation",
- "view",
- "modification",
- "deletion"
], - "face_sample": [
- "creation",
- "view",
- "deletion"
], - "body_sample": [
- "creation",
- "view",
- "deletion"
], - "image": [
- "creation",
- "view",
- "deletion"
], - "object": [
- "creation",
- "view",
- "deletion"
], - "token": [
- "creation",
- "view",
- "modification",
- "deletion"
], - "resources": [
- "iso",
- "sdk",
- "liveness"
], - "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}, - "lambdas": [
- "creation",
- "view",
- "modification",
- "deletion"
]
}, - "visibility_area": "all"
}
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/6/tokens/557d54ec-29ad-4f3c-93b4-c9092ef12515",
}
Get tokens.
page | integer >= 1 Default: 1 Page number. |
page_size | integer [ 1 .. 1000 ] Default: 10 Number of items on page. |
account_id | string <uuid> (account_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: account_id=8950722f-3fd4-4223-b48f-03f95f0e8dfb Account ID filter. Will not have effect if Luna-Account-Id header is used for authorization |
create_time__lt | string <date-time> (time) Example: create_time__lt=2018-08-11T09:11:41.674Z Upper bound for object create_time. |
create_time__gte | string <date-time> (time) Example: create_time__gte=2018-08-11T09:11:41.674Z Lower included bound for object create_time. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create token url = f"{baseUri}/tokens" headers = {"Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE="} payload = {"permissions": {"face": ["view"]}, "description": "description"} requests.post(url, json=payload, headers=headers) headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=" } url = f"{baseUri}/tokens" response = requests.get(url, headers=headers, params={"page": 1, "page_size": 10}) print(response.status_code) print(response.json())
{- "tokens": [
- {
- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "image": [ ],
- "object": [ ],
- "token": [
- "view"
], - "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}, - "lambdas": [ ]
}, - "description": "main account token",
- "expiration_time": "2050-11-11T11:11:11.111+03:00",
- "visibility_area": "account",
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "create_time": "2018-08-11T09:11:41.674Z",
- "last_update_time": "2018-08-11T09:11:41.674Z"
}
]
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Update token. You cannot update a part of the token, so you should specify all the fields for your token.
token_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb Token ID. |
grant_all_permissions | integer Default: 0 Enum: 0 1 Grant all permissions to token. 1 - give, 0 - do not give.
If value is Grant only standart permissions. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Content-Type | string Value: "application/json" Content type is |
required | object token permissions * it is possible to use custom fields for permissions besides those given here custom fields must have 3-16 characters (lowercase letters, _) with possible permissions:
|
description | string (token_description) <= 128 characters Default: "" Token description. |
expiration_time required | string or null <date-time> Token expiration time in RFC 3339 format. |
visibility_area | string (visibility_area) Default: "all" Enum: "account" "all" Specifies data visible for the token.
|
{- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "image": [ ],
- "object": [ ],
- "token": [
- "view"
], - "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}, - "lambdas": [ ]
}, - "description": "main account token",
- "expiration_time": "2050-11-11T11:11:11.111+03:00",
- "visibility_area": "account"
}
{- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/6/tokens/557d54ec-29ad-4f3c-93b4-c9092ef12515",
}
Get token by ID.
token_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb Token ID. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=" } url = f"{baseUri}/tokens" payload = {"permissions": {"face": ["view"]}, "description": "description", "expiration_time": None} tokenId = requests.post(url, json=payload, headers=headers).json()["token_id"] url = f"{baseUri}/tokens/{tokenId}" response = requests.get(url, headers=headers) print(response.status_code) print(response.json())
{- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "image": [ ],
- "object": [ ],
- "token": [
- "view"
], - "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}, - "lambdas": [ ]
}, - "description": "main account token",
- "expiration_time": "2050-11-11T11:11:11.111+03:00",
- "visibility_area": "account",
- "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbklkIjoiN2Q0MjYwNmEtZmM3NS00NDU4LWE3OGUtOWYzNGM2MjIyZWQyIiwiZXhwaXJhdGlvblRpbWUiOm51bGwsImFjY291bnRJZCI6IjdkYjUzNThiLWZjMzMtNDIwZC1hYTgzLTk5YTRkOWY0MGM0MSJ9.kDL5oLTJaxKyYbwmKV1lejxrzsFoFzx5VOzvTR-i90k",
- "token_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "account_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "create_time": "2018-08-11T09:11:41.674Z",
- "last_update_time": "2018-08-11T09:11:41.674Z"
}
Delete token by ID.
token_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb Token ID. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=" } url = f"{baseUri}/tokens" payload = {"permissions": {"face": ["view"]}, "description": "description", "expiration_time": None} tokenId = requests.post(url, json=payload, headers=headers).json()["token_id"] url = f"{baseUri}/tokens/{tokenId}" response = requests.delete(url, headers=headers) print(response.status_code)
{- "error_code": 12012,
- "desc": "Bad/incomplete input data",
- "detail": "Bad query parameters 'account_id'",
}
Get options for the resource.
token_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 8950722f-3fd4-4223-b48f-03f95f0e8dfb Token ID. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Verify account or login with password or token.
account id
verification, account_type
will be returnedlogin
/password
verification, account_id
and account_type
will be returnedtoken
verification, account_type
and token permissions
will be returnedLuna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type | string Value: "application/json" Content type is |
login required | string (login) [ 3 .. 128 ] characters ^[a-z0-9_\-\.]+@[a-z]+\.[a-z]{2,}$ Account email. |
password required | string (password) [ 3 .. 128 ] characters ^.{3,128}$ Account password. |
{- "login": "mylogin@gmail.com",
- "password": "string"
}
{- "account_type": "advanced_user",
- "permissions": {
- "face": [ ],
- "list": [ ],
- "event": [ ],
- "attribute": [ ],
- "handler": [ ],
- "verifier": [ ],
- "task": [ ],
- "face_sample": [ ],
- "body_sample": [ ],
- "image": [ ],
- "object": [ ],
- "token": [
- "view"
], - "resources": [ ],
- "emit_events": {
- "allowed": 1,
- "white_list": null,
- "black_list": null
}, - "lambdas": [ ]
}, - "account_id": "string"
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Detect faces and/or human bodies and estimate attributes on the input images. After the request is performed, the received data is not saved to the database or Image Store, it is only returned in the response.
The order of input images corresponds to the order of the elements in the output JSON.
If an input image is corrupted, an error is returned for the image. The processing of the other images continues in normal mode.
Notes for incoming data:
image_type | integer Default: 0 Enum: 0 1 2 Type of input image. 0 - raw image, 1 - face warped image, 2 - body warped image. | ||||||||
estimate_people_count | integer (int01) Default: 0 Enum: 0 1 Whether to estimate people count on the image. ⚠ People counter licensing feature is required to be enabled to perform estimation. | ||||||||
multiface_policy | integer (multiface_policy) Default: 1 Enum: 0 1 2 Multiple face detection policy:
| ||||||||
detect_face | integer (detect_face) Default: 0 Enum: 0 1 Whether to detect faces on the image. | ||||||||
detect_body | integer (detect_body) Default: 0 Enum: 0 1 Whether to detect human bodies on the image. | ||||||||
estimate_head_pose | integer (estimate_head_pose) Default: 0 Enum: 0 1 Whether to estimate head pose in the image. The head pose is represented by pitch, yaw and roll angles. Not supported with warped images (see | ||||||||
estimate_emotions | integer (estimate_emotions) Default: 0 Enum: 0 1 Whether to estimate emotions in the image. The probability of the following emotions is estimated: "anger", "disgust", "fear", "happiness", "sadness", "surprise", "neutral". | ||||||||
estimate_mask | integer (estimate_mask) Default: 0 Enum: 0 1 Whether to estimate mask in the image. The probability of the following masks states is estimated: "medical_mask", "missing", "occluded". The estimated probability with the highest score is returned in the "predominant mask" parameter. | ||||||||
estimate_glasses | integer (estimate_glasses) Default: 0 Enum: 0 1 Whether to estimate glasses in the image. One of the following parameters is returned: "eyeglasses", "sunglasses", "no_glasses". | ||||||||
estimate_liveness | integer (int01) Default: 0 Enum: 0 1 Whether to estimate liveness in the image. The "quality" and "score" probabilities are estimated. Based on these probabilities, the following result is returned: "real", "spoof", "unknown". Liveness is utilized for this estimation. See "Administrator’s manual" for details about Liveness requirements. ⚠ Webcam or selfie photos are required. Otherwise the result may be incorrect. ⚠ Liveness licensing feature is required to be enabled to perform liveness estimation. Liveness estimation is not supported for samples (warped images). The | ||||||||
estimate_deepfake | integer (int01) Default: 0 Enum: 0 1 Whether to estimate deepfake feature on the image. ⚠ Deepfake licensing feature is required to be enabled to perform deepfake estimation. Not supported with warped images (see | ||||||||
estimate_landmarks68 | integer (detect_landmarks68) Default: 0 Enum: 0 1 Whether to detect basic 68-point facial landmarks in the image. Not supported with warped images (see | ||||||||
estimate_landmarks5 | integer (detect_landmarks5) Default: 0 Enum: 0 1 Whether to detect basic 5-point facial landmarks in the image. Not supported with warped images (see | ||||||||
estimate_quality | integer (estimate_quality) Default: 0 Enum: 0 1 Whether to estimate input face image quality. Each of the following probabilities is estimated: "darkness", "light", "blurriness", "illumination", "specularity". The quality factor is estimated for each probability. It's value is in the range [0..1] where 0 corresponds to low quality and 1 to high quality. Note. Face recognition is not greatly affected by uneven illumination or high specularity. | ||||||||
estimate_gaze | integer (estimate_gaze) Default: 0 Enum: 0 1 Whether to estimate gaze in the image. The gaze is represented by yaw angle and pitch angle for both eyes at once. Not supported with warped images (see | ||||||||
estimate_eyes_attributes | integer (estimate_eyes_attributes) Default: 0 Enum: 0 1 Whether to estimate eye attributes in the image. The "right_eye" and "left_eye" parameters are estimated, which contain the "state" (opened, closed or occluded) and "iris_landmarks" parameters. | ||||||||
estimate_mouth_attributes | integer (estimate_mouth_attributes) Default: 0 Enum: 0 1 Whether to estimate mouth attributes in the image. Each of the following probabilities is estimated: "opened", "occluded", "smile", "score". | ||||||||
estimate_face_descriptor | integer (extract_descriptor) Default: 1 Enum: 0 1 Example: estimate_face_descriptor=1 Whether to estimate face descriptor(s). | ||||||||
estimate_basic_attributes | integer (extract_basic_attributes) Default: 0 Enum: 0 1 Whether to estimate face basic attributes (gender, age, ethnicity). | ||||||||
estimate_body_descriptor | integer (extract_descriptor) Default: 1 Enum: 0 1 Example: estimate_body_descriptor=1 Whether to create human body descriptor(s). | ||||||||
estimate_upper_body | integer (int01) Default: 0 Enum: 0 1 Whether to estimate human upper body on the image (headwear, clothing color, sleeve length). | ||||||||
estimate_lower_body | integer (int01) Default: 0 Enum: 0 1 Whether to estimate human lower body on the image (lower garment, shoes). | ||||||||
estimate_accessories | integer (int01) Default: 0 Enum: 0 1 Whether to estimate human body accessories on the image (backpack presence). | ||||||||
estimate_body_basic_attributes | integer (int01) Default: 0 Enum: 0 1 Whether to estimate human body basic attributes on the image (age, gender). | ||||||||
estimate_body_warp | integer (estimate_body_warp) Default: 0 Enum: 0 1 Whether to create a human body warped image in the Base64 format. | ||||||||
estimate_face_warp | integer (estimate_face_warp) Default: 0 Enum: 0 1 Whether to create the face warped image in the Base64 format. | ||||||||
aggregate_attributes | integer (aggregate_attributes) Whether to aggregate the following parameters:
Aggregation will be performed only if the appropriate parameters for estimating the listed above parameters are enabled. If set, all estimated parameters from each image will be aggregated and displayed in the Otherwise, all estimated parameters from each image will be displayed in the | ||||||||
pitch_threshold | integer (pitch_threshold) [ 0 .. 180 ] Example: pitch_threshold=180 Maximum deviation pitch angle from 0. If the estimated value is equal or less than the threshold, the image is filtered. Remove this parameter from the query, or set the parameter value to 180 if pitch angle filtration is not required. When the value is set to "0", all the images are filtered. | ||||||||
roll_threshold | integer (roll_threshold) [ 0 .. 180 ] Example: roll_threshold=180 Maximum deviation roll angle from 0. If the estimated value is equal or less than the threshold, the image is filtered. Remove this parameter from the query, or set the parameter value to 180 if roll angle filtration is not required. When the value is set to "0", all the images are filtered. | ||||||||
yaw_threshold | integer (yaw_threshold) [ 0 .. 180 ] Example: yaw_threshold=180 Maximum deviation yaw angle from 0. If the estimated value is equal or less than the threshold, the image is filtered. Remove this parameter from the query, or set the parameter value to 180 if yaw angle filtration is not required. When the value is set to "0", all the images are filtered. | ||||||||
score_threshold | number (score_threshold) [ 0 .. 1 ] Default: 0 Example: score_threshold=0.7 Descriptor quality score threshold. The higher the quality score for the image, the better the extraction results. All the attributes with a quality score below the threshold will be ignored (and not stored in the DB). The function will proceed as usual with all the remaining descriptors (if left). Consult VisionLabs about the recommended value of this parameter. Note! This parameter is not related to the image quality estimated in the detect request ( | ||||||||
mask_states | Array of integers (mask_states) non-empty Items Enum: 1 2 3 Example: mask_states=2&mask_states=3 Filter by mask states.
| ||||||||
liveness_states | Array of integers (liveness_states) non-empty Items Enum: 0 1 2 Example: liveness_states=1 Filter by liveness states.
| ||||||||
deepfake_states | Array of integers (deepfake_states) non-empty Items Enum: 0 1 Example: deepfake_states=1 Filter by deepfake states.
| ||||||||
use_exif_info | integer Default: 1 Enum: 0 1 Example: use_exif_info=1 Whether to try to auto orient image based on EXIF data. The processed image should have EXIF data, otherwise auto orientation will not be performed. Has no effect with tiff images (they're always auto oriented). Ignored with warped images (see | ||||||||
extract_exif | integer (extract_exif) Default: 0 Enum: 0 1 Whether to extract EXIF meta information from input JPEG images. Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data. This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details. |
Accept | string Enum: "application/json" "application/msgpack" Accept request header. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type | string Enum: "application/json" "multipart/form-data" "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64" |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
{- "images_estimations": [
- {
- "filename": "raw image",
- "exif": {
- "make": "Apple",
- "model": "iPhone 11",
- "gps": {
- "latitude": "55.0, 45.0, 18.29",
- "longitude": "37.0, 39.0, 16.32"
}, - "software": "13.6.1",
- "orientation": 6
}, - "estimations": [
- {
- "face": {
- "detection": {
- "rect": {
- "x": 71,
- "y": 45,
- "width": 134,
- "height": 178
}, - "landmarks5": [
- [
- 25,
- 25
], - [
- 83,
- 83
], - [
- 47,
- 47
], - [
- 33,
- 33
], - [
- 82,
- 82
]
], - "landmarks68": [
- [
- 1,
- 1
], - [
- 1,
- 1
], - [
- 4,
- 4
], - [
- 8,
- 8
], - [
- 14,
- 14
], - [
- 23,
- 23
], - [
- 33,
- 33
], - [
- 43,
- 43
], - [
- 60,
- 60
], - [
- 78,
- 78
], - [
- 96,
- 96
], - [
- 112,
- 112
], - [
- 124,
- 124
], - [
- 132,
- 132
], - [
- 135,
- 135
], - [
- 137,
- 137
], - [
- 138,
- 138
], - [
- 1,
- 1
], - [
- 8,
- 8
], - [
- 17,
- 17
], - [
- 26,
- 26
], - [
- 35,
- 35
], - [
- 59,
- 59
], - [
- 73,
- 73
], - [
- 86,
- 86
], - [
- 100,
- 100
], - [
- 113,
- 113
], - [
- 47,
- 47
], - [
- 45,
- 45
], - [
- 44,
- 44
], - [
- 43,
- 43
], - [
- 37,
- 37
], - [
- 42,
- 42
], - [
- 47,
- 47
], - [
- 54,
- 54
], - [
- 61,
- 61
], - [
- 14,
- 14
], - [
- 20,
- 20
], - [
- 29,
- 29
], - [
- 36,
- 36
], - [
- 28,
- 28
], - [
- 19,
- 19
], - [
- 69,
- 69
], - [
- 77,
- 77
], - [
- 86,
- 86
], - [
- 95,
- 95
], - [
- 88,
- 88
], - [
- 78,
- 78
], - [
- 33,
- 33
], - [
- 38,
- 38
], - [
- 45,
- 45
], - [
- 50,
- 50
], - [
- 57,
- 57
], - [
- 69,
- 69
], - [
- 82,
- 82
], - [
- 72,
- 72
], - [
- 60,
- 60
], - [
- 52,
- 52
], - [
- 45,
- 45
], - [
- 38,
- 38
], - [
- 36,
- 36
], - [
- 46,
- 46
], - [
- 51,
- 51
], - [
- 58,
- 58
], - [
- 77,
- 77
], - [
- 58,
- 58
], - [
- 51,
- 51
], - [
- 45,
- 45
]
], - "attributes": {
- "eyes_attributes": {
- "left_eye": {
- "iris_landmarks": [
- [
- 92,
- 92
], - [
- 92,
- 92
], - [
- 93,
- 93
], - [
- 93,
- 93
], - [
- 94,
- 94
], - [
- 95,
- 95
], - [
- 96,
- 96
], - [
- 98,
- 98
], - [
- 99,
- 99
], - [
- 100,
- 100
], - [
- 101,
- 101
], - [
- 102,
- 102
], - [
- 103,
- 103
], - [
- 104,
- 104
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 105,
- 105
], - [
- 104,
- 104
], - [
- 103,
- 103
], - [
- 102,
- 102
], - [
- 101,
- 101
], - [
- 100,
- 100
], - [
- 99,
- 99
], - [
- 98,
- 98
], - [
- 97,
- 97
], - [
- 96,
- 96
], - [
- 95,
- 95
], - [
- 94,
- 94
], - [
- 93,
- 93
], - [
- 93,
- 93
]
], - "state": "open"
}, - "right_eye": {
- "iris_landmarks": [
- [
- 152,
- 152
], - [
- 153,
- 153
], - [
- 153,
- 153
], - [
- 154,
- 154
], - [
- 154,
- 154
], - [
- 155,
- 155
], - [
- 157,
- 157
], - [
- 158,
- 158
], - [
- 159,
- 159
], - [
- 161,
- 161
], - [
- 162,
- 162
], - [
- 163,
- 163
], - [
- 164,
- 164
], - [
- 165,
- 165
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 166,
- 166
], - [
- 165,
- 165
], - [
- 164,
- 164
], - [
- 163,
- 163
], - [
- 162,
- 162
], - [
- 161,
- 161
], - [
- 159,
- 159
], - [
- 158,
- 158
], - [
- 158,
- 158
], - [
- 157,
- 157
], - [
- 156,
- 156
], - [
- 154,
- 154
], - [
- 154,
- 154
], - [
- 153,
- 153
]
], - "state": "open"
}
}, - "head_pose": {
- "pitch": 12.7464532852,
- "roll": -2.9892115593,
- "yaw": 17.7173442841
}, - "gaze": {
- "yaw": -5.9912848473,
- "pitch": -10.2646684647
}, - "emotions": {
- "predominant_emotion": "neutral",
- "estimations": {
- "anger": 8.682e-7,
- "disgust": 1.0670000000000001e-7,
- "fear": 4.386e-7,
- "happiness": 0.45658952,
- "sadness": 4.951e-7,
- "surprise": 0.0000029291,
- "neutral": 0.543405652
}
}, - "mask": {
- "predominant_mask": "occluded",
- "estimations": {
- "medical_mask": 0.020060448,
- "missing": 0.3235525191,
- "occluded": 0.6563870311
}, - "face_occlusion": {
- "predominant_occlusion": "correct",
- "estimations": {
- "full": 0.019,
- "clear": 0.02,
- "correct": 0.6108324766,
- "partially": 0.31,
- "mouth": 0.0209,
- "chin": 0.019097
}
}
}, - "glasses": {
- "glasses": "no_glasses"
}, - "mouth_attributes": {
- "score": 0.3884400725,
- "occluded": 1.4000000000000001e-9,
- "smile": 0.6115599275,
- "opened": 0.121500025
}, - "basic_attributes": {
- "ethnicities": {
- "predominant_ethnicity": "caucasian",
- "estimations": {
- "asian": 0.0000025556,
- "indian": 6.417e-7,
- "caucasian": 0.9999949932000001,
- "african_american": 0.0000017718000000000001
}
}, - "age": 24,
- "gender": 0
}, - "descriptor": {
- "sdk_descriptor": "ZHAAADgAAAB0k4SAf...IB6gHyAgH19fQ==",
- "score": 0.7854047418000001
}, - "liveness": {
- "prediction": "spoof",
- "estimations": {
- "quality": 0.7361597418785095,
- "score": 0.600364089012146
}
}, - "deepfake": {
- "prediction": "fake",
- "score": 0.600364089012146
}
}, - "quality": {
- "blurriness": 0.9769582748000001,
- "dark": 0.9542820454000001,
- "illumination": 0.8248310089,
- "specularity": 0.8472354412,
- "light": 0.8179533482
}, - "warp": "/9j/4AAQSkZJRgABAQAAAQABA..C4gb+KneZD/erEHWn0/asOTzP/9k="
}
}, - "body": {
- "detection": {
- "rect": {
- "x": 32,
- "y": 4,
- "width": 224,
- "height": 255
}, - "warp": "/9j/4AAQSkZJRgABAQAAAQABAA...CX6kdapTi1qS00f/Z",
- "attributes": {
- "descriptor": {
- "sdk_descriptor": "ZHAAAGUAAAC....AfX9",
- "score": 1
}, - "basic_attributes": {
- "apparent_age": 25,
- "apparent_gender": 0
}, - "upper_body": {
- "headwear": {
- "state": 0,
- "apparent_color": "undefined"
}, - "sleeve": {
- "length": "short"
}, - "upper_clothing": {
- "colors": [
- "white",
- "black"
]
}
}, - "lower_body": {
- "lower_garment": {
- "type": "trousers",
- "colors": [
- "white",
- "black"
]
}, - "shoes": {
- "apparent_color": "black"
}
}, - "accessories": {
- "backpack": {
- "state": 0
}
}
}
}
}
}
], - "image_estimations": {
- "people": {
- "count": 1
}
}
}
]
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Request for video analysis based on the specified analytics parameters eg facial estimations.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type | string Value: "application/json" |
required | object Video URL. |
required | Array of objects (people_count_analytics) A list of parameters for comprehensive video analytics. |
{- "analytics": [
- {
- "name": "people_count",
- "parameters": {
- "roi": {
- "x": 3327,
- "y": 3327,
- "width": 3327,
- "height": 3327,
- "mode": "abs"
}, - "rate": {
- "period": 10,
- "unit": "frame"
}, - "probe_count": 0,
- "people_count_threshold": 1
}
}
]
}
{- "video_data": {
- "frames_count": 0,
- "frame_rate": 0,
- "duration": 0
}, - "analytics": [
- {
- "name": "people_count",
- "result": {
- "crowd": {
- "events": [
- {
- "event_id": "string",
- "max_people_count": 0,
- "video_segment": {
- "start_time_offset": 0.123,
- "end_time_offset": 1.234,
- "start_frame_offset": 15,
- "last_frame_offset": 35
}, - "frames_estimations": [
- {
- "people_count": 0,
- "time_offset": 1.234,
- "frame_offset": 35
}
]
}
]
}
}
}
]
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
The resource performs a visual examination of frontal type images based on ISO/IEC 19794-5 standard. This means that the images that have passed the validation are standardized and attributes of the person's face meet the established requirements. For more information on the requirements for face attributes in the image, see ISO/IEC 19794-5 Clauses 7-10.
The output JSON contains the result of the check for each estimator. The image check is considered successful if the set of these results complies with the ISO standard.
The order of input images is corresponding to elements order in output JSON. If an image is broken, the resource will return an error for this image and other images will be correctly processed.
Notes for incoming data:
image_type | integer Default: 0 Enum: 0 1 Image type of input image. 0 - raw image, 1 - face warped image. |
multiface_policy | integer (iso_multiface_policy) Default: 0 Enum: 0 1 2 multiple face detection policy:
|
extract_exif | integer (extract_exif) Default: 0 Enum: 0 1 Whether to extract EXIF meta information from input JPEG images. Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data. This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details. |
Accept | string Enum: "application/json" "application/msgpack" Accept request header. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type | string Enum: "application/json" "multipart/form-data" "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64" |
{- "images": [
- {
- "filename": "raw image",
- "status": 1,
- "error": {
- "error_code": 0,
- "desc": "Success",
- "detail": "Success",
}, - "estimations": [
- {
- "face": {
- "detection": {
- "iso": {
- "status": 1,
- "checks": [
- {
- "name": "image_format",
- "object_value": "JPEG",
- "threshold_value": [
- "JPEG",
- "JPEG2000",
- "PNG"
], - "result": 1
}, - {
- "name": "illumination_quality",
- "object_value": 0.6005162000656128,
- "threshold_value": {
- "min": 0.3,
- "max": 1
}, - "result": 1
}, - {
- "name": "specularity_quality",
- "object_value": 0.7662366628646851,
- "threshold_value": {
- "min": 0.3,
- "max": 1
}, - "result": 1
}, - {
- "name": "blurriness_quality",
- "object_value": 0.9429352283477783,
- "threshold_value": {
- "min": 0.61,
- "max": 1
}, - "result": 1
}, - {
- "name": "dark_quality",
- "object_value": 0.9020983576774597,
- "threshold_value": {
- "min": 0.5,
- "max": 1
}, - "result": 1
}, - {
- "name": "light_quality",
- "object_value": 0.7881984114646912,
- "threshold_value": {
- "min": 0.57,
- "max": 1
}, - "result": 1
}, - {
- "name": "head_yaw",
- "object_value": 2.818983316421509,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "head_pitch",
- "object_value": 3.816443920135498,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "head_roll",
- "object_value": 5.434040069580078,
- "threshold_value": {
- "min": -8,
- "max": 8
}, - "result": 1
}, - {
- "name": "gaze_yaw",
- "object_value": -3.773012399673462,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "gaze_pitch",
- "object_value": 0.7140519022941589,
- "threshold_value": {
- "min": -5,
- "max": 5
}, - "result": 1
}, - {
- "name": "mouth_smiling",
- "object_value": 0.000290759839117527,
- "threshold_value": {
- "min": 0,
- "max": 0.5
}, - "result": 1
}, - {
- "name": "mouth_occluded",
- "object_value": 0.00009619363845558837,
- "threshold_value": {
- "min": 0,
- "max": 0.5
}, - "result": 1
}, - {
- "name": "mouth_open",
- "object_value": 0.6226108074188232,
- "threshold_value": {
- "min": 0,
- "max": 0.5
}, - "result": 1
}, - {
- "name": "glasses",
- "object_value": "no_glasses",
- "threshold_value": [
- "no_glasses",
- "eyeglasses"
], - "result": 1
}, - {
- "name": "left_eye",
- "object_value": "open",
- "threshold_value": [
- "open"
], - "result": 1
}, - {
- "name": "right_eye",
- "object_value": "open",
- "threshold_value": [
- "open"
], - "result": 1
}, - {
- "name": "head_horizontal_center",
- "object_value": 0.51,
- "threshold_value": {
- "min": 0.45,
- "max": 0.55
}, - "result": 1
}, - {
- "name": "head_vertical_center",
- "object_value": 0.51,
- "threshold_value": {
- "min": 0.3,
- "max": 0.5
}, - "result": 1
}, - {
- "name": "head_width",
- "object_value": 0.61,
- "threshold_value": {
- "min": 0.5,
- "max": 0.75
}, - "result": 1
}, - {
- "name": "head_height",
- "object_value": 0.71,
- "threshold_value": {
- "min": 0.6,
- "max": 0.9
}, - "result": 1
}, - {
- "name": "eye_distance",
- "object_value": 110,
- "threshold_value": {
- "min": 90,
- "max": null
}, - "result": 1
}, - {
- "name": "eyebrows_state",
- "object_value": "neutral",
- "threshold_value": [
- "neutral"
], - "result": 1
}, - {
- "name": "smile_properties",
- "object_value": "smile_lips",
- "threshold_value": [
- "none"
], - "result": 0
}, - {
- "name": "headwear_type",
- "object_value": "hat",
- "threshold_value": [
- "none"
], - "result": 0
}, - {
- "name": "natural_light",
- "object_value": 1,
- "threshold_value": 1,
- "result": 1
}, - {
- "name": "radial_distortion",
- "object_value": 0,
- "threshold_value": 0,
- "result": 1
}, - {
- "name": "red_eyes",
- "object_value": 0,
- "threshold_value": 0,
- "result": 1
}, - {
- "name": "face_color_type",
- "object_value": "color",
- "threshold_value": [
- "color"
], - "result": 1
}, - {
- "name": "background_lightness",
- "object_value": 0.5780888795852661,
- "threshold_value": {
- "min": 0.2,
- "max": 1
}, - "result": 1
}, - {
- "name": "background_uniformity",
- "object_value": 0.8874394297599792,
- "threshold_value": {
- "min": 0.5,
- "max": 1
}, - "result": 1
}, - {
- "name": "shoulders_position",
- "object_value": "parallel",
- "threshold_value": [
- "parallel"
], - "result": 1
}
]
}, - "rect": {
- "x": 108,
- "y": 58,
- "width": 113,
- "height": 165
}
}
}
}
]
}
]
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Detect faces in input images, create samples, and estimate face properties.
Detections can be filtered out by head pose. The pose is defined by yaw, pitch and roll angles.
To specify a filtering threshold per-angle, use corresponding query parameters
(yaw_threshold
, pitch_threshold
and roll_threshold
). By default no filtering is applied.
The estimated face properties are not saved to the Faces database. They are only returned in the response.
Samples are saved in the storage without the ability to disable saving. You can disable the saving of samples only using the handlers.
Notes for incoming data:
multiface_policy | integer (multiface_policy) Default: 1 Enum: 0 1 2 Multiple face detection policy:
|
estimate_head_pose | integer (estimate_head_pose) Default: 0 Enum: 0 1 Whether to estimate head pose in the image. The head pose is represented by pitch, yaw and roll angles. Not supported with warped images (see |
estimate_emotions | integer (estimate_emotions) Default: 0 Enum: 0 1 Whether to estimate emotions in the image. The probability of the following emotions is estimated: "anger", "disgust", "fear", "happiness", "sadness", "surprise", "neutral". |
estimate_mask | integer (estimate_mask) Default: 0 Enum: 0 1 Whether to estimate mask in the image. The probability of the following masks states is estimated: "medical_mask", "missing", "occluded". The estimated probability with the highest score is returned in the "predominant mask" parameter. |
detect_landmarks68 | integer (detect_landmarks68) Default: 0 Enum: 0 1 Whether to detect basic 68-point facial landmarks in the image.
Not supported with warped images (see |
extract_exif | integer (extract_exif) Default: 0 Enum: 0 1 Whether to extract EXIF meta information from input JPEG images. Exact output will vary since there are no mandatory requirements for both authoring software and digital cameras how to write the data. This function will only parse the tags and output their names and values as they are. Please refer to JEITA CP-3451 EXIF specification for details. |
estimate_quality | integer (estimate_quality) Default: 0 Enum: 0 1 Whether to estimate input face image quality. Each of the following probabilities is estimated: "darkness", "light", "blurriness", "illumination", "specularity". The quality factor is estimated for each probability. It's value is in the range [0..1] where 0 corresponds to low quality and 1 to high quality. Note. Face recognition is not greatly affected by uneven illumination or high specularity. |
estimate_gaze | integer (estimate_gaze) Default: 0 Enum: 0 1 Whether to estimate gaze in the image. The gaze is represented by yaw angle and pitch angle for both eyes at once. Not supported with warped images (see |
estimate_eyes_attributes | integer (estimate_eyes_attributes) Default: 0 Enum: 0 1 Whether to estimate eye attributes in the image. The "right_eye" and "left_eye" parameters are estimated, which contain the "state" (opened, closed or occluded) and "iris_landmarks" parameters. |
estimate_mouth_attributes | integer (estimate_mouth_attributes) Default: 0 Enum: 0 1 Whether to estimate mouth attributes in the image. Each of the following probabilities is estimated: "opened", "occluded", "smile", "score". |
pitch_threshold | integer (pitch_threshold) [ 0 .. 180 ] Example: pitch_threshold=180 Maximum deviation pitch angle from 0. If the estimated value is equal or less than the threshold, the image is filtered. Remove this parameter from the query, or set the parameter value to 180 if pitch angle filtration is not required. When the value is set to "0", all the images are filtered. |
roll_threshold | integer (roll_threshold) [ 0 .. 180 ] Example: roll_threshold=180 Maximum deviation roll angle from 0. If the estimated value is equal or less than the threshold, the image is filtered. Remove this parameter from the query, or set the parameter value to 180 if roll angle filtration is not required. When the value is set to "0", all the images are filtered. |
yaw_threshold | integer (yaw_threshold) [ 0 .. 180 ] Example: yaw_threshold=180 Maximum deviation yaw angle from 0. If the estimated value is equal or less than the threshold, the image is filtered. Remove this parameter from the query, or set the parameter value to 180 if yaw angle filtration is not required. When the value is set to "0", all the images are filtered. |
warped_image | integer (warped_image) Default: 0 Enum: 0 1 Whether an input image is a sample or not. |
use_exif_info | integer Default: 1 Enum: 0 1 Example: use_exif_info=1 Whether to try to auto orient image based on EXIF data. The processed image should have EXIF data, otherwise auto orientation will not be performed. Has no effect with tiff images (they're always auto oriented). Ignored with warped images (see |
estimate_face_quality | integer Default: 0 Enum: 0 1 Whether to estimate face quality. It enables you to perform various face quality checks by thresholds which similar to ISO standard. For more information on the requirements for face attributes in the image, see ISO/IEC 19794-5 Clauses 7-10. ⚠ ISO licensing feature is required to be enabled to perform face quality estimation. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Content-Type | string Enum: "image/jpeg" "image/png" "image/bmp" "image/x-portable-pixmap" "image/tiff" "multipart/form-data" "application/json" "image/x-jpeg-base64" "image/x-png-base64" "image/x-bmp-base64" "image/x-tiff-base64" "image/x-portable-pixmap-base64" |
{- "images": [
- {
- "filename": "face_1.jpg",
- "error": {
- "error_code": 0,
- "desc": "Success",
- "detail": "Success",
}, - "status": 1,
- "detections": {
- "samples": [
- {
- "face": {
- "detection": {
- "rect": {
- "x": 594,
- "y": 181,
- "width": 678,
- "height": 963
}, - "landmarks5": [
- [
- 169,
- 169
], - [
- 454,
- 454
], - [
- 325,
- 325
], - [
- 227,
- 227
], - [
- 466,
- 466
]
], - "quality": {
- "blurriness": 0.9740276337,
- "dark": 0.9211971164,
- "illumination": 0.8751303554,
- "specularity": 0.9605293274,
- "light": 0.8855836391
}, - "attributes": {
- "mouth_attributes": {
- "opened": 0.021500025,
- "occluded": 0.9998804331,
- "smile": 0,
- "score": 1
}, - "head_pose": {
- "pitch": 6.7033782005,
- "roll": -6.140639782,
- "yaw": 3.3139002323
}, - "gaze": {
- "yaw": 0.281270504,
- "pitch": -1.0716878176
}
}
}, - "url": "/6/samples/faces/f9285806-371e-4c61-be00-0424029856e3",
- "sample_id": "50cccef8-3ea8-42a0-8e6d-68b90ee148f6"
}
}
], - "filtered_detections": {
- "face_detections": [ ]
}
}
}
]
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Save face or body sample to the storage.
samples_type required | string Enum: "faces" "bodies" Samples type. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Content-Type | string Enum: "image/jpeg" "image/png" "image/bmp" "image/tiff" "image/x-portable-pixmap" |
Image generated by VisionLabs algorithms.
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/samples/faces" response = requests.post(url, data=image, headers=headers) print(response.status_code) print(response.json())
{- "sample_id": "b5d6fd45-fcca-453d-ac05-3e594054b813",
- "url": "/6/samples/bodies/b5d6fd45-fcca-453d-ac05-3e594054b813"
}
Get options for the resource.
samples_type required | string Enum: "faces" "bodies" Samples type. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Get face or body sample by ID.
samples_type required | string Enum: "faces" "bodies" Samples type. |
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create sample headers = { "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/samples/faces" sampleId = requests.post(url, data=image, headers=headers).json()["sample_id"] # get sample headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", } url = f"{baseUri}/samples/faces/{sampleId}" response = requests.get(url, headers=headers) print(response.status_code) print(response.json())
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Check if face or body sample with sample_id
exists.
samples_type required | string Enum: "faces" "bodies" Samples type. |
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create sample headers = { "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/samples/faces" sampleId = requests.post(url, data=image, headers=headers).json()["sample_id"] # get sample headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", } url = f"{baseUri}/samples/faces/{sampleId}" response = requests.head(url, headers=headers) print(response.status_code)
Remove face or body sample by ID.
samples_type required | string Enum: "faces" "bodies" Samples type. |
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create sample headers = { "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/samples/faces" sampleId = requests.post(url, data=image, headers=headers).json()["sample_id"] # get sample headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", } url = f"{baseUri}/samples/faces/{sampleId}" response = requests.delete(url, headers=headers) print(response.status_code)
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Get options for the resource.
samples_type required | string Enum: "faces" "bodies" Samples type. |
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 13003,
- "desc": "Object not found",
- "detail": "Image with id '7acc35cf-a3b2-4f87-8d8b-5496a2782d37' not found",
}
Get sample by ID using previous API version.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Check if face or body sample with sample_id
exists using previous API version.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Remove sample by ID using previous API version.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Get options for the resource using previous API version.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 13003,
- "desc": "Object not found",
- "detail": "Image with id '7acc35cf-a3b2-4f87-8d8b-5496a2782d37' not found",
}
Get a face sample by ID.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Check if face sample with sample_id
exists.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Remove sample by ID.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Get options for the resource.
sample_id required | string <uuid> (uuid) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 13003,
- "desc": "Object not found",
- "detail": "Image with id '7acc35cf-a3b2-4f87-8d8b-5496a2782d37' not found",
}
Save images with unique ID.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type | string Enum: "image/jpeg" "image/png" "image/bmp" "image/tiff" "image/x-portable-pixmap" Type of transferring image. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
* (X-Luna-Meta-<user_defined_key>) | string Example: <user_defined_value> User-defined image metadata key-value. To store metadata values for multiple keys, the multiple headers should be defined. |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/images" response = requests.post(url, data=image, headers=headers) print(response.status_code) print(response.json())
{- "image_id": "141d2706-8baf-433b-82eb-8c7fada847da",
- "url": "/6/images/141d2706-8baf-433b-82eb-8c7fada847da",
}
Get options for the resource.
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Check if image with image_id
exists.
image_id required | string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 Image ID. |
with_meta | integer Default: 0 Enum: 0 1 Example: with_meta=1 Whether to retrieve user-defined image metadata. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create sample headers = { "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/images" imageId = requests.post(url, data=image, headers=headers).json()["image_id"] # get image headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", } url = f"{baseUri}/images/{imageId}" response = requests.head(url, headers=headers) print(response.status_code)
Delete an image.
image_id required | string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 Image ID. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create sample headers = { "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/images" imageId = requests.post(url, data=image, headers=headers).json()["image_id"] # get image headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", } url = f"{baseUri}/images/{imageId}" response = requests.delete(url, headers=headers) print(response.status_code)
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Receive an origin image.
image_id required | string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 Image ID. |
with_meta | integer Default: 0 Enum: 0 1 Example: with_meta=1 Whether to retrieve user-defined image metadata. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" # create sample headers = { "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "image/jpeg", } with open("face_warp.jpg", "rb") as image_file: image = image_file.read() url = f"{baseUri}/images" imageId = requests.post(url, data=image, headers=headers).json()["image_id"] # get image headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", } url = f"{baseUri}/images/{imageId}" response = requests.get(url, headers=headers) print(response.status_code)
{- "error_code": 11065,
- "desc": "Authorization failed",
- "detail": "Bad format basic authorization header",
}
Get options for the resource.
image_id required | string <uuid> (image_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 Image ID. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Save object with unique ID.
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
Content-Type required | string Type of transferring information.
|
Some user defined bytes. The service saves the bytes as is
.
# This example is written using requests library import requests baseUri = "http://127.0.0.1:5000/6" headers = { "Luna-Request-Id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a", "Authorization": "Basic bHVuYUB2aXNpb25sYWJzLnJ1Omx1bmE=", "Content-Type": "text/plain", } url = f"{baseUri}/objects" response = requests.post(url, data="example", headers=headers) print(response.status_code) print(response.json())
{- "object_id": "141d2706-8baf-433b-82eb-8c7fada847da",
- "url": "/6/objects/141d2706-8baf-433b-82eb-8c7fada847da",
}
Get options for the resource.
Luna-Account-Id | string <uuid> ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Deprecated Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a Account ID. An account is a limitation for all the user actions (matching, removing, updating and other) on data which does not have corresponding account ID. For example: it is impossible to attach a face with one account ID to a list with another account ID. User can make a limited set of requests without this header (requests with methods GET, HEAD, OPTIONS, match requests and getting events statistics requests). |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a External request ID. Helps to uniquely identify messages in system logs that correspond to particular requests. If it was not set, the system will set it to the default format ("timestamp, UUID"). It will be returned with the response. |
{- "error_code": 37002,
- "desc": "Request timeout",
- "detail": "Service did not receive a complete request message within 60 seconds",
}
Receiving objects.
object_id required | string <uuid> (object_id) ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]... Example: 557d54ec-29ad-4f3c-93b4-c9092ef12515 Object ID. |
Luna-Request-Id | string^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... |