Photo$0.05 per call
VIN from a photo
Send a JPEG, PNG or WebP photo. The VIN barcode is read first when there is one; otherwise the text is read with a vision model. Every VIN is checked against its check digit and decoded with NHTSA before it is returned. Photos are processed in memory and never stored.
POST /v1/ocr/vin
Request body
Send the photo (JPEG, PNG or WebP, up to 4 MB) either as a multipart upload with a file field named image, or as JSON: {"image": "<base64>", "media_type": "image/jpeg"}. A data URL works in image too. Photos are processed in memory and never stored.
| Name | In | Description |
|---|
Request
curl -X POST "https://api.hubcapdata.com/v1/ocr/vin" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F image=@photo.jpgResponse
Sample data from test mode. Live responses have the same fields.
{
"data": {
"vin": "5NMJBCAE7NH235366",
"method": "barcode",
"confidence": "high",
"check_digit_valid": true,
"corrected": false,
"vehicle": {
"year": 2022,
"make": "Hyundai",
"model": "Tucson"
}
},
"meta": {
"request_id": "req_4n8b2v6c1x9z3l7k5j0h",
"mode": "live",
"cost": 0.05,
"cached": false,
"balance": 98.42
}
}Errors
400 invalid input, 401 bad key, 402 not enough credit, 404 no record (free), 429 rate limited, 503 sources unavailable (free). See Errors.