API Reference

The AutoScan backend is a FastAPI service. Base URL: https://autoscan-api.onrender.com

Interactive Swagger docs
POST/api/detect-plateDetect and read the number plate in an image.

Request

curl -X POST https://autoscan-api.onrender.com/api/detect-plate \
  -F "file=@car.jpg"

Response

{
  "success": true,
  "plate_number": "MH12AB1234",
  "confidence": 95.4,
  "bbox_coordinates": [142, 351, 759, 460],
  "record_id": 42,
  "ai_insights": {
    "country_state": "India - Maharashtra",
    "formatted_plate": "MH 12 AB 1234",
    "plate_type": "Private vehicle"
  },
  "processing_time_ms": 4210.5
}
GET/api/history?limit=50&offset=0List past scans, newest first.

Request

curl "https://autoscan-api.onrender.com/api/history?limit=10"

Response

{
  "total": 128,
  "records": [
    { "id": 42, "plate_number": "MH12AB1234", "confidence": 95.4, "is_verified": false, ... }
  ]
}
PUT/api/plates/{id}Correct a plate number; marks the record as verified.

Request

curl -X PUT https://autoscan-api.onrender.com/api/plates/42 \
  -H "Content-Type: application/json" \
  -d '{"plate_number": "MH12AB1235"}'

Response

{ "success": true, "record": { "id": 42, "plate_number": "MH12AB1235", "is_verified": true, ... } }
DELETE/api/plates/{id}Delete a scan record.

Request

curl -X DELETE https://autoscan-api.onrender.com/api/plates/42

Response

{ "success": true, "message": "Record 42 deleted successfully" }
POST/api/auth/signupCreate an account. Passwords are stored as PBKDF2-SHA256 hashes.

Request

curl -X POST https://autoscan-api.onrender.com/api/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"name": "Munna", "email": "munna@example.com", "password": "secret123"}'

Response

{ "success": true, "user": { "id": 1, "name": "Munna", "email": "munna@example.com" } }
GET/api/healthService status and configured integrations.

Request

curl https://autoscan-api.onrender.com/api/health

Response

{ "status": "online", "gemini_configured": true, ... }

Note: the free-tier server sleeps after 15 minutes of inactivity; the first request after that can take up to a minute.