v1 API Endpoints (deprecated)

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

Headers

Request Body

Response body JSON containing file information and parameters:

{
  "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
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

Headers

{
  "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

Headers

{
    // Response
}

Get image binary segmentation mask

GET https://api.celantur.com/v1/file/{id}/binary-mask

Path Parameters

Headers

{
    // Response
}

Get image instance segmentation mask

GET https://api.celantur.com/v1/file/{id}/instance-mask

Path Parameters

Headers

{
    // Response
}

Get metadata

GET https://api.celantur.com/v1/file/{id}/metadata

Returns metadata (detected objects) in JSON format

Query Parameters

{
   "customer_id":"2c46d468-ee8c-4317-b4d4-aff8462f4543",
   "file_id":"04b4db09-3b1d-4e2e-8141-935cadad6dcd",
   "detections":[
      {
         "score":"0.9995585083961487",
         "offset":[
            "1209",
            "2752"
         ],
         "color":"None",
         "bbox":[
            "1209",
            "2752",
            "2529",
            "6477"
         ],
         "parent_image":"04b4db09-3b1d-4e2e-8141-935cadad6dcd.jpg",
         "id":"0",
         "type_label":"face",
         "type":"103",
         "is_anonymised":true
      },
      {
         "score":"0.9993017911911011",
         "offset":[
            "2133",
            "2803"
         ],
         "color":"None",
         "bbox":[
            "2133",
            "2803",
            "3444",
            "6553"
         ],
         "parent_image":"04b4db09-3b1d-4e2e-8141-935cadad6dcd.jpg",
         "id":"0",
         "type_label":"face",
         "type":"103",
         "is_anonymised":true
      }
   ],
   "webhook": null,
   "upload_time": "20/04/2023, 07:17:37",
   "kernel_size_vehicle": "61",
   "score": false,
   "name": "a1b69a69-50dd-4541-a6ba-13ce26ec767d.jpg",
   "method": "blur",
   "vehicle": false,
   "compress_level": "5",
   "delete_time": null,
   "ignores": [],
   "webhook_status": "empty",
   "bbox": false,
   "face_anonymization_gradient_start": "0.3",
   "debug": false,
   "file_status": "done",
   "license_plate_anonymization_gradient_start": "0.3",
   "person": false,
   "mask_scale": "100",
   "license_plate_anonymization_gradient_stop": "0",
   "face": true,
   "kernel_size_person": "91",
   "quality": "90",
   "kernel_size_face": "0.35",
   "face_anonymization_gradient_stop": "0",
   "save_mask": "all",
   "kernel_size_license_plate": "0.5",
   "format": "whole",
   "license_plate": false
}

Get original file

GET https://api.celantur.com/v1/file/{id}/original

Path Parameters

Headers

{
    // Response
}

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

Headers

{
  "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

{
  "ChallengeParameters": {},
  "AuthenticationResult": {
    "AccessToken": "acces_token",
    "ExpiresIn": 3600,
    "TokenType": "Bearer",
    "RefreshToken": "ref_token",
    "IdToken": "id_token"
  }
}

Last updated