Getting Started
Learn how to read license plates (ANPR/ALPR) and recognize vehicle make, model and color (MMR) using the Adaptive Recognition Cloud Vehicle API in less than 5 minutes!
Register to get your free credits
First, if you haven't already done so, you need to register at the Cloud Console. The free tier provides 1000 requests per month which should be enough for running some tests or even a low-traffic application.
Get your API key
After registering, log in to the Cloud Console, click "How To Use" on the left sidebar, scroll down until you see the box below, and copy your API key.
Find a test image
Find an image of a vehicle with the license plate visible, or download this one for a quick test:
Determine the region and country
Choose the region and expected location of the vehicle. For the image above, the region is eur
(Europe) and the location is ROU
(Romania).
Valid values for the region are:
- Europe:
eur
- Africa:
afr
- Australia:
aus
- North America:
nam
- Central America:
cam
- South America:
sam
- East Asia:
eas
- Central Asia:
cas
- South Asia:
sas
- Middle East:
arab
- Middle East:
me
For a list of all possible locations, please refer to this table.
Send a request to the Vehicle API
Using your tool of choice, send the following POST request to the URL https://api.cloud.adaptiverecognition.com/vehicle/<region>
(substitute the region you have chosen in the previous section):
- Header:
Content-Type: multipart/form-data
- Header:
X-Api-Key: <Your API Key>
- Field
image
: the test image with its appropriate content type (e.g.image/jpeg
orimage/png
) - Field
location
: the location - Field
service
:anpr,mmr
For example, using the command line tool cURL and the test image linked before, you can issue the following command:
curl -X POST 'https://api.cloud.adaptiverecognition.com/vehicle/eur' \
-H 'X-Api-Key: <Your API Key>' \
-H 'Content-Type: multipart/form-data' \
-F 'service=anpr,mmr' \
-F 'location=ROU' \
-F "image=@vehicle-api-test-image.png;type=image/jpeg"
The response will contain the make, model and color of the vehicle and the text of its license plate (truncated for brevity):
{
"data": {
"vehicles": [
{
"plate": {
"found": true,
"country": "ROU",
"plateTypeConfidence": 47,
"positionConfidence": 100,
"plateChars": [ ... ],
"unicodeText": "B365BMW",
"separatedText": "B 365 BMW",
"engine": "cmanpr-7.3.12.116 : rou_local",
"proctime": 73,
"confidence": 33,
"plateROI": { ... },
"plateType": 110026
},
"mmr": {
"engine": "mmr-7.3.4.24 : mmr-eur",
"found": true,
"proctime": 87,
"category": "CAR",
"categoryConfidence": 62,
"color": {
"r": 0,
"g": 0,
"b": 255
},
"colorConfidence": 95,
"make": "BMW",
"model": "5",
"makeConfidence": 100,
"modelConfidence": 62,
"heading": "frontal",
"headingConfidence": 99
},
"bounds": { ... }
}
]
},
"nodename": "74f2fb5c-8be8-4a2b-bcfb-e0708eacfd04 ([380]e1a68a7ba39f4ed4b128b1fc5b17aecb)",
"nodetime": 250,
"version": "1.3"
}
Further Reading
- See how to call the Vehicle API using different tools or programming languages:
- Read the API reference