Skip to main content

VisionAlert API Reference

Welcome to the Plate Recognizer VisionAlert API! Use our API to create camera monitoring logs and detect issues such as camera blockage, movement, blurry images, or glare.

For detailed instructions on how to set up VisionAlert, go here.

VisionAlert 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 abcdef123456xxxxxxxxxxxxxxxxxxxxxxxxxxxx.

Get your token from here.

Create Camera Monitoring Log​

This VisionAlert API endpoint creates a camera monitoring log by analyzing an uploaded image for issues such as camera blockage, movement, blurry images, or glare.

HTTP Request​

POST https://api.platerecognizer.com/v1/vision-alert/create-log/

  • Content-Type: multipart/form-data
  • The CORS policy of this endpoint does not allow requests from all origins.

POST Parameters​

ParameterRequiredDescription
uploadYesThe image file to be analyzed for camera issues.
camera_idYesUnique identifier for the camera submitting the image for analysis.
# Upload an image for camera monitoring analysis
curl -X POST \
-H "Authorization: Token YOUR_API_TOKEN" \
-F "camera_id=camera1" \
-F "upload=@/path/to/image.png" \
https://api.platerecognizer.com/v1/vision-alert/create-log/

Response​

The API will merely receive send images and return a success message. This is because VisionAlert analyzes all the footage asynchronously, making the results available through the VisionAlert dashboard or webhooks if configured, within an hour from the last image was uploaded.

If successful, the API will return:

{
"message": "Log created successfully."
}

Otherwise, the response is an error message, such as the following:

{
"message": "Camera already uploaded a log recently."
}

The above response indicates that the camera has already uploaded a log recently, and the API will not process the request.

Rate Limits​

  • 1 request per second, for any camera is applied, as per our general API rate limiting policy.
  • 1 request every 15 minutes for each camera, meaning that each camera can only upload one image every 15 minutes for analysis.

Errors​

Error CodeMeaning
400Bad Request: Missing required parameters or invalid image format
401Unauthorized: Invalid or missing API token
403Forbidden: VisionAlert is not enabled for your account
429Too Many Requests: Rate limit exceeded
Floating button icon
CTRL + .