Skip to main content

Blur API Reference

Welcome to the Plate Recognizer Blur API! Use our API to blur license plates and faces in images. Check detailed instructions on how to install Blur SDK. Blur forwards images to Snapshot API then uses the detected plate bounding box to perform accurate blurring. Plate Recognizer Blur is only available to registered users with blur enabled. Sign up for a Free Trial to get an API Token.

Blur Cloud API​

Authentication​

All API calls must include an Authorization header containing the API Token in below format:

Authorization: Token YOUR_API_TOKEN

danger

For the commands below, make sure to replace YOUR_API_TOKEN with your API Token. For example, Authorization: Token 3a0effff73919f898b69ac65a32dc12347769564.

Get your token from, here.

Blur Plates and Faces in an Image​

This snapshot API endpoint blurs number plates and human faces in an image.

tip
  • To programmatically process a bunch of images in a folder, refer to our Blur Images Guide.

HTTP Request​

POST https://blur.platerecognizer.com/v1/blur

The CORS policy of this endpoint does not allow requests from all origins.

POST Parameters​

ParameterRequiredDescription
uploadYesThe file to be uploaded. optional if upload_url param is present.
upload_urlNoThe url of file to be uploaded. Given priority over upload param.
regionsNoRegions forwarded to Snapshot
skip_regexpNoOverride configuration SKIP_REGEXP. Can be specified multiple times.
facesConditionallyOverride configuration FACES. Either faces or plates, or both, are required.
platesConditionallyOverride configuration PLATES. Either plates or faces, or both, are required.
logoNoLogo file or a file path in /logos directory. Overrides configuration LOGO. Setting an empty string param disables env LOGO
configNoExtends configuration CONFIG.
etNoExclude a percentage margin of image height at the top.
elNoExclude a percentage margin of image width at the left.
ebNoExclude a percentage margin of image height at the bottom.
erNoExclude a percentage margin of image width at the right.
xminNoExcluded region bounding box xmin.
yminNoExcluded region bounding box ymin.
xmaxNoExcluded region bounding box xmax.
ymaxNoExcluded region bounding box ymax.
splitNoSplit image into horizontal chunks before blur. Use on panoramic images
overlapNoOverlap percentage if splitting image. Default is 20.
camera_idNoOverride configuration CAMERA_ID.
snapshot_filenameNoCustom file name sent to Snapshot, Default is the uploaded file name.
copy_metadataNoOverride configuration COPY_METADATA. Copies metadata from the input image to the blurred image if set to true
face_max_resolutionNoOverride configuration FACE_MAX_RESOLUTION.
# Process an image from a URL
curl -H "Authorization: Token YOUR_API_TOKEN" -d "upload_url=https://app.platerecognizer.com/static/demo.jpg" -d "faces=10" -d "plates=10" https://blur.platerecognizer.com/v1/blur

# Get back unskewed bounding box in JSON format but skip burring
curl -H "Authorization: Token YOUR_API_TOKEN" -d "upload_url=https://app.platerecognizer.com/static/demo.jpg" https://blur.platerecognizer.com/v1/blur

# Download a test picture
curl -o /tmp/car.jpg https://app.platerecognizer.com/static/demo.jpg

# Upload to API for blurring
curl -H "Authorization: Token YOUR_API_TOKEN" -F "upload=@/tmp/car.jpg" -F "faces=10" -F "plates=10" https://blur.platerecognizer.com/v1/blur

# Upload image and logo
curl -H "Authorization: Token YOUR_API_TOKEN" -F "upload=@/tmp/car.jpg" -F "logo=@/tmp/logo.jpg" -F "faces=10" -F "plates=10" https://blur.platerecognizer.com/v1/blur


Response​

Accurate Polygon points around the plates and faces in JSON format.

{
"faces": [
{
"box": {
"xmax": 326,
"xmin": 300,
"ymax": 137,
"ymin": 100
},
"score": 0.7088521122932434
}
],
"plates": [
{
"polygon": [
[
157.375,
494.484375
],
[
272.546875,
544.453125
],
[
268.890625,
581.625
],
[
153.109375,
531.65625
]
],
"result": {}
}
],
"blur": {
"content_type": "image/jpeg",
"filename": "demo.jpg",
"base64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAIB..."
}
}
AttributeDescription
faces/boxFace detection bounding box
faces/scoreFace detection score between 0-1. Closer to 0 means low confidence, Closer to 1 means high confidence
plates/polygonAccurate plate bounding box polygon points
plates/resultOriginal plate detection result from Snapshot
blurBlurred image result, null if blurring on the server is disabled. Enable by include faces or plates params or set a blur intensity greater than 0 in config FACES or PLATES.
blur/filenameBlur filename
blur/content_typeResponse image content type. null if unknown
blur/base64Blurred image in base64

Errors​

CodeMeaning
400An error occurred, check error in JSON response body for more info.
403Refer to Snapshot 403 Error
413Refer to Snapshot 413 Error
429Refer to Snapshot 429 Error

Sample Error Response

{"error":"An Error Occurred ... "}

Blur On-Premise API​

Blur service is also available on-premise. Get started with the SDK. It has a similar interface as the blur API and hosted locally.

info

Are you using the on-premise API from a different device? Make sure that your firewall allows it. For example, you can disable the Windows Defender firewall to check if it is blocking the API calls.

Blur API​

HTTP Request​

POST http://localhost:8001

The CORS policy of this endpoint does not allow requests from all origins. This endpoint has no maximum calls per second contrary to our Cloud API.

Parameters​

All the parameters from blur cloud API.

# Process an image from a URL
curl -d "upload_url=https://app.platerecognizer.com/static/demo.jpg" -d "faces=10" -d "plates=10" http://localhost:8001/

# Get back unskewed bounding box in JSON format and skip burring
curl -d "upload_url=https://app.platerecognizer.com/static/demo.jpg" http://localhost:8001/

# Download a test picture
curl -o /tmp/car.jpg https://app.platerecognizer.com/static/demo.jpg
# Upload to API for blurring
curl -F "upload=@/tmp/car.jpg" -F "faces=10" -F "plates=10" http://localhost:8001/
# Upload image and logo
curl -F "upload=@/tmp/car.jpg" -F "logo=@/tmp/logo.jpg" -F "faces=10" -F "plates=10" http://localhost:8001/


SDK Version​

Show version and Snapshot version

HTTP Request​

GET http://localhost:8001/info/

JSON Response​

Returns the SDK version and forwards Snapshot response from info. Returns null for Snapshot incase unreachable, errored or if using snapshot Cloud.

{
"version": "1.0.2",
"snapshot":{
"version": "1.3.8",
"license_key": "XXX",
"total_calls": 2500,
"usage": {"calls": 10},
"webhooks": []
}
}

Floating button icon
CTRL + .