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://tyrecam.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/analyze

Analyze 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

MethodLimitNotes
Anonymous (IP)3 scans / dayFor demo testing
Free Account10 scans / monthShared between web & API Keys
Scan Packs+100 scans per packDoes not expire. Used after monthly limit.
Pro PlanUnlimitedFor active subscriptions

API Use Cases

Fleet Management Systems

Integrate tire diagnostics into your fleet operations

Automate tire condition checks across your vehicle fleet. Upload photos from driver mobile devices and receive structured JSON responses with wear classification, tread depth estimates, and safety recommendations. Perfect for logistics companies, trucking fleets, and rental car services.

Tire Shop & Service Station Software

Add AI-powered tire scanning to your booking platform

Enable customers to pre-scan their tires before visiting your shop. The API returns detailed wear patterns and depth measurements that help you prepare the right equipment and parts. Reduces wait times and improves customer satisfaction with data-driven service recommendations.

Mobile App Development

Build custom tire inspection applications

Leverage our REST API to build native iOS or Android tire inspection apps. The API accepts multipart form uploads and returns comprehensive JSON responses including confidence scores, model alignment metrics, and TWI consensus counts. SDK-compatible with any language that supports HTTP requests.

Insurance & Risk Assessment

Vehicle risk scoring with tire condition data

Incorporate objective tire wear data into your vehicle risk assessment models. Tire condition is a key factor in accident prevention and insurance pricing. Our API provides quantifiable metrics (tread depth in mm, wear class, THI score) that can be integrated into automated underwriting workflows.

Frequently Asked Questions

How accurate is the AI tire depth estimation?

Our multi-model AI engine achieves typical accuracy of ±0.5mm for tread depth estimation when provided with clear, well-lit tire photos taken at the recommended angle. The API response includes a confidence score (0-1) and model alignment percentage so you can assess reliability for each scan. For optimal results, follow the photo guidelines: vertical shot against the tread face with good lighting.

What image formats are supported?

The API accepts JPEG, PNG, and WebP image formats up to 10MB per file. We recommend using high-resolution photos (at least 1000px on the shortest side) for best accuracy. The API automatically preprocesses images through browser-side gatekeeping to verify the subject is actually a tire before processing, saving your API quota.

Can I use this API for commercial products?

Yes. Our API is designed for integration into commercial applications including fleet management systems, tire shop software, and mobile apps. Free tier users get 3 scans per day for testing. Registered free accounts receive 10 scans per month. Pro plan users get unlimited access with priority processing. Contact us for enterprise licensing with custom rate limits and SLA guarantees.

What does the Tread Health Index (THI) represent?

The Tread Health Index (THI) is a proprietary 0-100 score that represents the remaining useful life of the tire tread relative to a new tire. A THI of 100 means the tire is essentially new, while a THI below 20 indicates the tire is near the legal wear limit. THI considers both absolute tread depth and wear pattern uniformity across the tire surface, providing a single actionable metric for maintenance decisions.