API_DOCUMENTATION // v1
API Reference
Integrate tire wear analysis into your applications with our REST API.
Quick Start
Get started with a single API call
curl -X POST https://scantire.com/api/v1/analyze \ -H "X-API-Key: scantire_your_key_here" \ -F "image=@tire-photo.jpg"
Authentication
API Key (Recommended)
Header: X-API-Key: scantire_...
Cookie Auth
Uses the auth-token cookie established via web login.
Endpoints
POST
/api/v1/analyzeAnalyze a tire image and get wear classification & depth
Request (multipart/form-data)
image: File (JPEG/PNG/WebP, max 10MB) verbose: "1" (optional, returns full base64 overlays and points)
Response (200 OK)
{
"success": true,
"data": {
"scanId": "clxyz...",
"result": {
"wear": "good", // Condition class
"confidence": 0.847, // AI confidence (0-1)
"estimatedDepthMm": 5.2, // Primary depth estimate
"depthRangeMm": {
"min": 4.5,
"max": 6.7
},
"treadHealthIndex": 62, // 0-100% remaining life
"isPreliminary": false, // True if models disagree
"modelAlignment": 88, // Inter-model agreement %
"twiConsensusCount": 2, // Verified physical markers
"processingTimeMs": 2340,
"modelVersion": "0.4.1-equal-mean",
"disclaimer": "Tread depth estimate only. Not a full safety inspection."
}
}
}Error Response (4xx/5xx)
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Monthly scan limit (10) reached."
}
}Rate Limits
| Method | Limit | Notes |
|---|---|---|
| Anonymous (IP) | 3 scans / day | For demo testing |
| Free Account | 10 scans / month | Shared between web & API Keys |
| Scan Packs | +100 scans per pack | Does not expire. Used after monthly limit. |
| Pro Plan | Unlimited | For active subscriptions |