API Endpoints

Celantur Cloud API v2 endpoints

Overview

API URL:
https://api.celantur.com/v2/
Celantur Cloud API supports only images at the moment. Support for videos will be added soon.
post
https://api.celantur.com/v2
/task
Create anonymization task
Creates a task for anonymizing images.
Uploading an image to the upload_url starts the anonymization process.
Required parameters for a task are anonymization_method and either face, person, license_plate or vehicle.
Parameters
Header
Authorization*
String
Authorization token
Body
anonymization_method*
String
Specifies anonymization method:
blur, pixelate, blacken
face
Boolean
Specifies whether faces should be anonymized/detected.
license-plate
Boolean
Specifies whether license plates should be anonymized/detected.
person
Boolean
Specifies whether persons should be anonymized/detected.
vehicle
Boolean
Specifies whether vehicles should be anonymized/detected.
debug
Boolean
Print bounding boxes and segmentation masks of detected objects on the image.
Default: false
score
Boolean
Print the detection scores of objects on the image. Works only if debug is true
format
String
Specifies the resolution of the input images and subsequently uses optimized parameter presets for the image processing (e.g. "pano:8000" for an image resolution of 8000x4000).
Parameter: Resolution
"whole": default, valid for all resolutions
"pano:4096": 4096x2048
"pano:5400": 5400x2700
"pano:5640": 5640x2816
"pano:7060": 7060x3530
"pano:7680": 7680x3840
"pano:8000": 8000x4000
"pano:7680": 7680x3840
"pano:8000": 8000x4000
"pano:8192": 8192x4096
"pano:11000": 11000x5500
bbox
Boolean
Anonymize bounding boxes of objects (instead of segmentation).
ignores
String
Specifies pixel coordinates of areas on the image in which no anonymization will be applied (as JSON).
Example:
[{"topLeftX":182, "topLeftY":154,
"width":2000,
"height":2000}]
webhook
String
A webhook URL to which a POST request is sent to after successful processing.
More details here: Webhooks
start_on
String
Specifies whether the anonymization process of this task should start when a file has been uploaded (upload), or a request has been sent (start_request) to POST v2/task/{id}/start.
Example:
start_on: "start_request"
Default: upload
binary_segmentation_mask
Boolean
Specifies whether a binary segmentation mask should be generated for the provided file.
instance_segmentation_mask
Boolean
Specifies whether an instance segmentation mask should be generated for the provided file.
mask-scale
Number
Specifies the ratio at which the mask file will be scaled down, range between 0 .. 100.
Default: 100
quality
Number
Specifies image quality of anonymized images in JPEG format: 0 .. 100
Default: 90
compress-level
Number
Specifies image compression level of anonymized images in PNG format.
Default: 5
kernel-size-face
Number
Specifies the kernel size for face blurring. See Customize Blurring
Default: 0.35
kernel-size-person
Number
Specifies the kernel size for person blurring. See Customize Blurring
Default: 95
kernel-size-license-plate
Number
Specifies the kernel size for license plate blurring. See Customize Blurring
Default: 0.5
kernel-size-vehicle
Number
Specifies the kernel size for vehicle blurring. See Customize Blurring
Default: 61
face-anonymization-gradient-start
Number
Specifies the gradient start value for face blurring. See Customize Blurring
Default: 0.3
face-anonymization-gradient-stop
Number
Specifies the gradient stop value for face blurring. See Customize Blurring
Default: 0.0
license-plate-anonymization-gradient-start
Number
Specifies the gradient start value for license plate blurring. See Customize Blurring
Default: 0.3
license-plate-anonymization-gradient-stop
Number
Specifies the gradient stop value for license plate blurring. See Customize Blurring
Default: 0.0
face_threshold
Float
Specifies detection threshold from 0..1 for faces.
Default: 0.5
vehicle_threshold
Float
Specifies detection threshold from 0..1 for vehicles.
Default: 0.4
person_threshold
Float
Specifies detection threshold from 0..1 for persons.
Default: 0.4
license_plate_threshold
Float
Specifies detection threshold from 0..1 for license plates.
Default: 0.5
Responses
200: OK
Response body with JSON
400: Bad Request
Parameter doesn't exist
400: Bad Request
Parameter received unexpected value
400: Bad Request
Parameter value value caused an error
400: Bad Request
Request body is not correct
400: Bad Request
JSON body missing
500: Internal Server Error

get
https://api.celantur.com/v2
/task/{id}
Get task
Retrieve a specific task. The anonymized_url is included in the response body in case the task_status is done and the anonymized image can be downloaded.
In case the task failed, the task_status is set to failed and a "failure_cause" property will be added to the response body.
Parameters
Path
id*
String
id of the task
Header
Authorization
String
Authorization
Responses
200: OK
Task as JSON
200: OK
Task as JSON with task failure cause
400: Bad Request
MIssing task ID
400: Bad Request
Task ID not an integer
400: Bad Request
No task with specified task ID found
500: Internal Server Error
Unexpected error
get
https://api.celantur.com/v2
/task/{id}/status
Get task status
Returns the status of the specified task. The anonymized_url is included in the response body in case the task_status is “done” and the anonymized image can be downloaded.
In case the task failed, the task_status is set to failed and a "failure_cause" property will be added to the response body.
Parameters
Path
id*
String
id of the task
Header
Authorization*
String
Authorization token
Responses
200: OK
Task status
200: OK
Task status for failed task with failure cause
400: Bad Request
No task with specified task ID found
400: Bad Request
Task ID is not an interger
500: Internal Server Error
Unexpected error
get
https://api.celantur.com/v2
/task/{id}/metadata
Get task metadata
Returns the metadata of the specified task. Metadata contain a detections property containing a list of detections of the corresponding file.
204 with an empty body is returned when :
- No detections where found
- The task has not finished processing yet
- The task failed
Parameters
Path
id*
String
id of the task
Header
Authorization*
String
Authorization token
Responses
200: OK
Task metadata with detections
204: No Content
No detections, task_status failed or task has not finished processing yet
400: Bad Request
No task with specified task ID found
400: Bad Request
Task ID is not an integer
500: Internal Server Error
Unexpected error
post
https://api.celantur.com/v2
/signin
Sign in (authorization)
Provide your username and password credentials (of your app.celantur.com account) as a JSON payload to authenticate, and receive your AccessToken to use Celantur Cloud API.
{ "username": "[email protected]", "password": "password" }
Parameters
Body
username*
String
Username as JSON property
password*
Password as JSON property
Responses
200: OK
Authentication result
400: Bad Request
Incorrect username or password