<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Performing Vehicle Tracking Analysis

## Tesseract OCR

| Command | Description |
|---|---|
| `tesseract image.jpg stdout --psm 7` | Single line text recognition |
| `tesseract image.jpg stdout --psm 8` | Single word recognition |
| `tesseract image.jpg stdout -l eng+rus` | Multi-language recognition |

### Page Segmentation Modes (PSM)

| Mode | Description |
|---|---|
| 6 | Assume uniform block of text |
| 7 | Treat image as single text line |
| 8 | Treat image as single word |
| 13 | Raw line — treat as single text line, no OSD |

## DVLA Vehicle Enquiry API (UK)

| Field | Description |
|---|---|
| `POST /vehicles` | Query by registration number |
| Body: `{"registrationNumber": "AB12CDE"}` | JSON request |
| Returns: make, colour, yearOfManufacture, taxStatus, motStatus | Key fields |

## NHTSA VIN Decoder (US)

| Endpoint | Description |
|---|---|
| `GET /api/vehicles/decodevin/<VIN>?format=json` | Decode VIN to vehicle details |
| `GET /api/vehicles/getallmakes?format=json` | List all manufacturers |

## Agent Script

```bash
node agent.js plate-extract --image vehicle.jpg
node agent.js vehicle-lookup --plate "AB12CDE" --country gb
node agent.js vehicle-identify --image vehicle.jpg
node agent.js track-vehicle --plate "AB12CDE" --image-dir ./images/
node agent.js --self-test
```
