Celantur Cloud API supports only images at the moment. Support for videos will be added soon.
Create anonymization task
POSThttps://api.celantur.com/v2/task
Creates a task for anonymizing images.
Uploading an image to the upload_url starts the anonymization process. If the file uploaded to the upload_url is not the content type image/jpeg or image/png the task status will be set to failed along with the failure cause CONTENT_TYPE_ERROR
Required parameters for a task are anonymization_method and either face, person, license_plate or vehicle.
Headers
Name
Type
Description
Authorization*
String
Authorization token
Request Body
Name
Type
Description
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.
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.
{"status_code":400,"error":"Could not create task. {parameter} parameter caused an error. This parameter does not exist."}
{"status_code":400,"error":"Could not create task. {parameter} parameter received an unexpected value."}
{"status_code":400,"error":"Could not create task. {parameter} parameter value caused an error. {Error cause}"}
{"status_code":400,"error":"Could not create task. Request body is not correct. {Error cause}"}
{"status_code":400,"error":"Could not create task. Please add a JSON body."}
{"status_code":404,"error":"Task is deleted. Please upload a new task."}
{"status_code":500,"error":"An unexpected error occurred. If the problem persists, please contact Celantur support (hello@celantur.com)."}
Get task
GEThttps://api.celantur.com/v2/task/{id}
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.
{"status_code":400,"error":"Getting task results failed. Please enter a task ID."}
{"status_code":400,"error":"Wrong format for Task ID. {task_id} is not an integer."}
{"status_code":400,"error":"Task ID not found. There is no task with task ID {task_id}."}
{"status_code":500,"error":"An unexpected error occurred. If the problem persists, please contact Celantur support (hello@celantur.com)."}
Get task status
GEThttps://api.celantur.com/v2/task/{id}/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.
{"status_code":400,"error":"Task ID not found. There is no task with task ID {task_id}."}
{"status_code":400,"error":"Wrong format for Task ID. {task_id} is not an integer."}
{"status_code":500,"error": "An unexpected error occurred. Please try creating a task again. If the problem persists, please contact Celantur support (hello@celantur.com)."
}
List tasks
GEThttps://api.celantur.com/v2/task/list
List tasks and filter by creation time and task status.
Use pagination by specifying the next_page_key parameter.
Query Parameters
Name
Type
Description
create_time_before*
String
Filter: Return tasks which were created before the specified date.
Format: YYYY-MM-DD
create_time_after*
String
Filter: Return tasks which were created after the specified date.
Format: YYYY-MM-DD
task_status
String
Filter by specified task status. Has to be either "new", "queued", "processing", "done" or "failed".
Default: None
next_page_key
String
The task_id that specifies the starting position of a page. The task with the provided task_id is not part of the page.
limit
Number
Maximum number of tasks on a page. If the parameter is smaller than the minimum or larger than the maximum the parameter will automatically be set to minimum or maximum value.
{"status_code":400,"error":"Please enter a properly formatted time for the create_time_before value. Correct format: YYYY-MM-DD"}
{"status_code":400,"error":"Wrong format for task_id. Please enter an integer."}
{"status_code":400, "error": "Please enter a correct task_status. Task status value can only be one of ['new', 'queued', 'processing', 'done', 'failed']"
}
{"status_code":400,"error":"No create_time_* parameters have been specified."}
{"status_code":400,"error":"Please check your create_time_* parameters. create_time_after can not be later than/equal to create_time_before."}
{"status_code":500, "error": "An unexpected error occurred. If the problem persists, please contact Celantur support (hello@celantur.com)."
}
Sign in (authorization)
POSThttps://api.celantur.com/v2/signin
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.