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 "Content-Type: multipart/form-data" \ -F "image=@tire-photo.jpg"
Authentication
During beta, anonymous requests are allowed with rate limits. For higher limits, authenticate via cookie or API key.
Cookie Auth
Login via web interface. Token stored in auth-token cookie.
API Key
Coming Soon
Header: X-API-Key: your_key
Endpoints
POST
/api/v1/analyzeAnalyze a tire image and get wear classification
Request
# Content-Type: multipart/form-data
{
"image": File (JPEG/PNG, max 10MB)
}Response (200 OK)
{
"success": true,
"data": {
"scanId": "clx123abc...",
"result": {
"wear": {
"level": "good", // new|good|medium|worn|critical
"label": "Good Condition",
"description": "Tire showing normal wear patterns",
"color": "#84cc16"
},
"confidence": 0.847, // 0.0 - 1.0
"estimatedDepthMm": 5.2, // Tread depth in mm
"processingTimeMs": 234,
"modelVersion": "resnet18-v1-beta"
}
}
}Error Response (4xx/5xx)
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Daily scan limit reached"
}
}GET
/api/v1/scansGet scan history for authenticated user
Authentication required
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Items per page (default: 10, max: 50) |
Response (200 OK)
{
"success": true,
"data": {
"scans": [
{
"id": "clx123abc...",
"wearLevel": "good",
"confidence": 0.847,
"estimatedDepthMm": 5.2,
"processingTimeMs": 234,
"createdAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 42,
"totalPages": 5
}
}
}Rate Limits
| User Type | Limit | Period |
|---|---|---|
| Anonymous (IP-based) | 3 scans | per day |
| Free Account | 10 scans | per month |
| Pro Account | Unlimited | — |
| API Key | 1,000 requests | per month |
Wear Classification Classes
5-class tire wear classification system
| Level | Depth | Color | Status |
|---|---|---|---|
| new | ≥7.0mm | #22c55e | Excellent |
| good | 5.0-6.9mm | #84cc16 | Good |
| medium | 3.0-4.9mm | #eab308 | Fair |
| worn | 1.6-2.9mm | #f97316 | Replace Soon |
| critical | <1.6mm | #ef4444 | Unsafe |