Skip to main content

Stream Cloud API Reference

Stream Cloud API provides methods to upload videos for processing in the cloud and receive results via webhooks. This requires a Stream Cloud license with video upload enabled.

Stream Cloud Video Upload API

To enable video upload for your stream cloud license, visit graphical configuration page:

  1. Add at least one webhook to forward results to.
  2. Click on Video Upload, optionally enter a preferred Camera ID then Submit
  3. The page will now show Video Upload. Click on Camera Processing to enable back camera processing.
  4. View your list of Stream cloud licenses to quickly find the one with video upload enabled
tip
  • Licenses with upload enabled cannot be run concurrently on premise
  • Videos must be downloadable from upload_url without encryption
  • The video size limit is 100 MB
  • The processing timeout for the video after download is 45 seconds

Authentication

Stream Cloud is only available to registered users. All API calls must contain the Authorization HTTP header

danger

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

Get your Stream API token here.

HTTP Request

POST https://api.platerecognizer.com/v1/stream/video-upload/

The CORS policy of this endpoint allows requests from all origins.

POST Parameters

ParameterRequiredDescription
upload_urlNoThe url of file to be uploaded. This parameter is to be used as an alternative to upload parameter.
regionsNoMatch the license plate pattern of specific state(s) or country(ies). Best practice is to indicate the top 3-4 states/countries of vehicle plates that camera will be observing. This optimizes the engine to correctly decode zero vs letter O, one vs letter I, etc. Note that even if a foreign vehicle arrives, engine will still decode that foreign vehicle correctly. Accepts multiple arguments or comma-separated values. See list of states and countries.
camera_idNoUnique camera identifier.
mmcNoPredict vehicle make, model, orientation and color. This feature is available for an additional fee. Set parameter to true (mmc=true) if you have this feature enabled/purchased to get vehicle make, model and color. Possible values are true or false.
tip

Free test video url: https://app.platerecognizer.com/static/demo.mp4

Api call samples process test video url:

video from a URL
curl -X POST -F upload_url="https://app.platerecognizer.com/static/demo.mp4" \
-H "Authorization: Token YOUR_API_TOKEN" \
https://api.platerecognizer.com/v1/stream/video-upload/
Change camera ID
curl -X POST -F upload_url="https://app.platerecognizer.com/static/demo.mp4" \
-F camera_id=camera123 \
-H "Authorization: Token YOUR_API_TOKEN" \
https://api.platerecognizer.com/v1/stream/video-upload/

HTTP Response

The response is immediate and contains configuration parameters used to initiate the processing.

The video will be downloaded from the URL, processed then results will be sent out as Stream webhooks to specified targets.


HTTP 201 Created
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

{
"regions": [],
"upload_url": "https://app.platerecognizer.com/static/demo.mp4",
"mmc": "yes",
"camera_id": "camera123"
}

Response camera_id and mmc will come from license configuration if unspecified.

Errors

Error CodeMeaning
403Forbidden: API Token is wrong.
400You don't have Video upload enabled or configured correctly.
429Indicates the user has sent too many requests in a given amount of time.
Floating button icon
CTRL + .