Overview
API URL: https://api.celantur.com/v1/
Celantur Cloud API supports only images at the moment. Support for videos will be added soon.
Upload image
POST
https://api.celantur.com/v1/file
Upload image that is processed with the specified method.
The payload is limited to 4.45 MB. This limitation will be removed in the upcoming weeks.
Query Parameters
Request Body
200: OK Response body with JSON
Response body JSON containing file information and parameters:
Copy {
"customer_id" : "customer_id" ,
"file_id" : "file_id" ,
"upload_time" : "24/01/2023, 14:07:51" ,
"delete_time" : null ,
"name" : "example.jpg" ,
"debug" : false ,
"score" : false ,
"method" : "blur" ,
"face" : true ,
"license_plate" : false ,
"person" : false ,
"vehicle" : false ,
"format" : "whole" ,
"bbox" : false ,
"ignores" : [] ,
"mask_scale" : 100 ,
"save_mask" : "all" ,
"quality" : 90 ,
"compress_level" : 5 ,
"kernel_size_face" : 0.35 ,
"kernel_size_person" : 91 ,
"kernel_size_license_plate" : 0.5 ,
"kernel_size_vehicle" : 61 ,
"face_anonymization_gradient_start" : 0.3 ,
"face_anonymization_gradient_stop" : 0.0 ,
"license_plate_anonymization_gradient_start" : 0.3 ,
"license_plate_anonymization_gradient_stop" : 0.0 ,
"webhook" : null ,
"file_status" : "queued" ,
"webhook_status" : "empty"
}
Correctly encode strings for query parameters
When setting format, ignores and webhook values, strings must be encoded.
String encoding in Python
Copy webhook_url = 'https://example.com/webhook/dev?sender=celantur&approve=always'
# encode the URL you want to send the webhook to
# returns 'https://example.com/webhook/dev?sender=celantur%26approve=always'
webhook_url_encoded = webhook_url . encode ()
See further string encoding examples in Java , C# , JavaScript and cUrl .
Get file status
GET
https://api.celantur.com/v1/file/{id}/status
Path Parameters
200: OK File status as JSON
Copy {
"file_id" : "f8bd9047-9c21-401b-89e4-ff54392e377a" ,
"file_status" : "done" ,
"delete_time" : null
}
Get anonymized file
GET
https://api.celantur.com/v1/file/{id}/anonymized
Path Parameters
Get image binary segmentation mask
GET
https://api.celantur.com/v1/file/{id}/binary-mask
Path Parameters
200: OK Binary segmentation mask
Get image instance segmentation mask
GET
https://api.celantur.com/v1/file/{id}/instance-mask
Path Parameters
200: OK Instance segmentation mask
Get metadata
GET
https://api.celantur.com/v1/file/{id}/metadata
Returns metadata (detected objects) in JSON format
Query Parameters
200: OK Metadata in JSON format
Get original file
GET
https://api.celantur.com/v1/file/{id}/original
Path Parameters
List files
GET
https://api.celantur.com/v1/list
Returns a paginated JSON list of all files ('items' in this context) a user has sent.
The JSON result contains information about the total item count and respective total page count depending on the specified limit
.
E.g.: {'total_item_count': 46, 'total_page_count': 10, 'items': [...]}
The total page calculation: total item count / limit = total page count
Query Parameters
200: OK List of all files by page
Copy {
"total_item_count" : "134" ,
"total_page_count" : "67" ,
"items" : [
{
"customer_id" : "customer_id" ,
"file_id" : "file_id1" ,
"detections" : " " ,
"bbox" : false ,
"debug" : "True" ,
"delete_time" : null ,
"face" : "True" ,
"file_status" : "queued" ,
"format" : "whole" ,
"ignores" : "[{\"topLeftX\": 182, \"topLeftY\": 154, \"width\": 2000, \"height\": 2000}]" ,
"license_plate" : false ,
"mask_scale" : "100" ,
"method" : "blur" ,
"person" : false ,
"save_mask" : "all" ,
"score" : "True" ,
"upload_time" : "10/01/2023, 16:01:23" ,
"vehicle" : false ,
"kernel_size_face" : 0.35 ,
"kernel_size_person" : 91 ,
"kernel_size_license_plate" : 0.5 ,
"kernel_size_vehicle" : 61 ,
"face_anonymization_gradient_start" : 0.3 ,
"face_anonymization_gradient_stop" : 0.0 ,
"license_plate_anonymization_gradient_start" : 0.3 ,
"license_plate_anonymization_gradient_stop" : 0.0
} ,
{
"customer_id" : "customer_id" ,
"file_id" : "file_id2" ,
"detections" : " " ,
"bbox" : false ,
"debug" : "True" ,
"delete_time" : null ,
"face" : "True" ,
"file_status" : "queued" ,
"format" : "{\"number\": [2, 2], \"overlap\": [0, 0]}" ,
"ignores" : "[{\"topLeftX\": 182, \"topLeftY\": 154, \"width\": 2000, \"height\": 2000}]" ,
"license_plate" : false ,
"mask_scale" : "100" ,
"method" : "blur" ,
"person" : false ,
"save_mask" : "all" ,
"score" : "True" ,
"upload_time" : "11/01/2023, 08:20:02" ,
"vehicle" : false ,
"kernel_size_face" : 0.35 ,
"kernel_size_person" : 91 ,
"kernel_size_license_plate" : 0.5 ,
"kernel_size_vehicle" : 61 ,
"face_anonymization_gradient_start" : 0.3 ,
"face_anonymization_gradient_stop" : 0.0 ,
"license_plate_anonymization_gradient_start" : 0.3 ,
"license_plate_anonymization_gradient_stop" : 0.0
}
]
}
Sign in (authorization)
POST
https://api.celantur.com/v1/signin
Provide username/password as JSON payload to receive authorization token.
{ "username": "username@usermail.com", "password": "password" }
Request Body
200: OK Authentication result
Copy {
"ChallengeParameters" : {} ,
"AuthenticationResult" : {
"AccessToken" : "acces_token" ,
"ExpiresIn" : 3600 ,
"TokenType" : "Bearer" ,
"RefreshToken" : "ref_token" ,
"IdToken" : "id_token"
}
}