Rueda Lens

API Reference

POST /v1/analyze

Analyze tire and vehicle images to identify tire and vehicle information.

Analyzes tire and vehicle images using advanced AI to identify the vehicle's brand, model, year, trim levels, and tire specifications.

Endpoint

POST https://api.ruedalens.com/v1/analyze

Authentication

Requires a valid API key in the Authorization header.

Authorization: Bearer rdlns_sk_...

Request

Headers

HeaderValueRequired
AuthorizationBearer rdlns_sk_...Yes
Content-Typeapplication/jsonYes

Body Parameters

ParameterTypeRequiredDescription
tireImagestringYesBase64-encoded tire image
carImagestringYesBase64-encoded vehicle image

Example Request

curl -X POST https://api.ruedalens.com/v1/analyze \
  -H "Authorization: Bearer rdlns_sk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "tireImage": "/9j/4AAQSkZJRg...",
    "carImage": "/9j/4AAQSkZJRg..."
  }'

Response

Success — 200 OK

{
  "success": true,
  "requestId": "cmlecazi4000111qu590n9v6i",
  "data": {
    "vehicles": [
      {
        "confidence": 0.98,
        "brand": "Lexus",
        "model": "NX",
        "trims": ["300h", "300"],
        "start_year": 2017,
        "end_year": 2021,
        "current_tire": {
          "width": 225,
          "aspect_ratio": 60,
          "diameter": 18,
          "load_index": "100",
          "speed_index": "H",
          "structure": "R",
          "runflat": null,
          "xl": null
        },
        "oe_front_tire": {
          "width": 225,
          "aspect_ratio": 60,
          "diameter": 18,
          "load_index": "100",
          "speed_index": "H",
          "structure": "R",
          "runflat": false,
          "xl": false
        },
        "oe_rear_tire": {
          "width": 225,
          "aspect_ratio": 60,
          "diameter": 18,
          "load_index": "100",
          "speed_index": "H",
          "structure": "R",
          "runflat": false,
          "xl": false
        },
        "pressure_front": 2.2,
        "pressure_rear": 2.2
      }
    ]
  },
  "metrics": {
    "executionTimeMs": 10364
  },
  "timestamp": "2026-02-08T22:54:03.962Z"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request was successful
requestIdstringUnique request identifier for tracking and debugging
data.vehiclesarrayArray of identified vehicle matches (ordered by confidence)
data.vehicles[].confidencenumberAI confidence score (0.0 to 1.0)
data.vehicles[].brandstringVehicle manufacturer
data.vehicles[].modelstringBase vehicle model
data.vehicles[].trimsstring[]Available trim levels for this model
data.vehicles[].start_yearnumberFirst production year for this generation
data.vehicles[].end_yearnumberLast production year for this generation
data.vehicles[].current_tireobjectTire specification found on the tire sidewall
data.vehicles[].oe_front_tireobjectOriginal equipment front tire specification
data.vehicles[].oe_rear_tireobjectOriginal equipment rear tire specification
data.vehicles[].pressure_frontnumberRecommended front tire pressure (bar)
data.vehicles[].pressure_rearnumberRecommended rear tire pressure (bar)
metrics.executionTimeMsnumberTotal processing time in milliseconds
timestampstringISO 8601 timestamp of the response

Tire Object Structure

Each tire object (current_tire, oe_front_tire, oe_rear_tire) contains:

FieldTypeDescription
widthnumberTire width in millimeters (e.g., 225)
aspect_rationumberSidewall height as percentage of width (e.g., 60)
diameternumberWheel diameter in inches (e.g., 18)
load_indexstringLoad capacity rating (e.g., "100")
speed_indexstringMaximum speed rating (e.g., "H")
structurestringTire construction type (typically "R" for radial)
runflatboolean|nullWhether tire is run-flat capable
xlboolean|nullWhether tire has extra load capacity

Understanding the Tire Fields

The response includes three tire specifications that serve different purposes:

  • current_tire: The tire specification read from the sidewall image via OCR. This is what's actually mounted on the vehicle. May contain null values if text isn't legible.
  • oe_front_tire: The original equipment (OE) tire specification for the front axle from the manufacturer's database. This is what came from the factory.
  • oe_rear_tire: The original equipment tire specification for the rear axle. For most vehicles, this matches the front tire unless the vehicle has a staggered setup.

Current vs. OE tires

The current tire may differ from OE specifications if the owner has changed tire sizes. Use current_tire to know what's on the vehicle now, and oe_front_tire/oe_rear_tire to suggest compatible replacements.

Understanding Confidence Scores

The confidence field (0.0 to 1.0) indicates how certain the AI is about the vehicle identification:

Confidence RangeInterpretationRecommendation
0.95 - 1.0Very high confidenceSafe to auto-process
0.85 - 0.94High confidenceGenerally reliable, minor verification recommended
0.70 - 0.84Moderate confidenceManual verification recommended
< 0.70Low confidenceRequires manual review

Low confidence results

When confidence is below 0.70, we recommend presenting the results to users for manual verification. This typically happens with unclear images, unusual vehicle models, or ambiguous tire markings.

Understanding Trims Array

The trims array is ordered by likelihood, with the most probable trim first:

"trims": ["300h", "300", "200t"]

This means the vehicle is most likely a "300h" trim, but could also be a "300" or "200t". Use the first trim for the most likely match.

Error Responses

400 Bad Request

{
  "success": false,
  "error": {
    "code": "INVALID_IMAGE",
    "message": "Invalid request body",
    "details": {
      "field": "tireImage",
      "issue": "Must be a valid base64-encoded image"
    }
  }
}

401 Unauthorized

{
  "success": false,
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Invalid API key"
  }
}

429 Too Many Requests

Returned as RATE_LIMIT_EXCEEDED for burst rate limits, or QUOTA_EXCEEDED for monthly quota exhaustion (Sandbox plan):

{
  "success": false,
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "Monthly quota exceeded"
  }
}

Image Requirements

PropertyRequirement
FormatJPEG or PNG
EncodingBase64-encoded string (without data URL prefix)
Max size10 MB per image
Recommended resolution1920x1080 or higher (images are automatically optimized)

Image Quality Guidelines

The quality of your input images directly affects accuracy. Follow these guidelines for best results:

Tire Image Best Practices

  • Lighting: Ensure even lighting with no harsh shadows on the sidewall text
  • Angle: Photograph perpendicular to the wheel (straight-on, not at an angle)
  • Focus: Make sure all text on the sidewall is sharp and legible
  • Coverage: Capture the entire tire size marking (e.g., "225/60 R18 100H")
  • Avoid: Blurry images, extreme angles, heavy shadows, or obstructed text

Vehicle Image Best Practices

  • Framing: Include the full vehicle in the shot (front three-quarter, side, or rear angles work best)
  • Distance: Stand 10-15 feet away for optimal framing
  • Clarity: Ensure the vehicle's body style and design elements are clearly visible
  • Avoid: Extreme close-ups, partial vehicle shots, or heavily cropped images

Resolution vs. file size

While higher resolution improves accuracy, images over ~2MP provide diminishing returns. We recommend 1920x1080 as a good balance between quality and upload speed. Images are automatically downscaled to 1500px during processing.

Visual Examples

Below are real-world examples demonstrating proper image capture technique for optimal results.

Example 1: Standard Conditions

Clean tire example - sidewall text clearly visible

Tire image: Perpendicular angle, even lighting, all sidewall text legible

Vehicle example - clear three-quarter view

Vehicle image: Full view with clear body lines and design elements

Example 2: Challenging Conditions

Our system maintains high accuracy even with less-than-perfect conditions:

Muddy tire example - system handles difficult conditions

Muddy tire: Despite dirt and poor conditions, the system successfully extracts tire specifications

Vehicle in challenging conditions

Vehicle image: Rugged conditions demonstrate robust recognition capabilities

Advanced AI capabilities

Our recognition engine is trained to handle real-world conditions including dirt, mud, wear, and suboptimal lighting. While clean, well-lit images provide the best results, the system maintains high accuracy across diverse scenarios.

Performance & Billing

Processing Time

Typical end-to-end response time: 7-15 seconds

This includes:

  • Network time: Image upload to our servers (~1-3s depending on connection and image size)
  • Server processing: AI analysis and enrichment (~7-10s)
  • Network time: Response download (<1s)

Factors affecting processing time:

FactorImpactOptimization
Image sizeLarger files = longer uploadResize to 1920x1080 before encoding
Image resolutionMinimal (auto-downscaled)No need to exceed 2MP
Network latencyVariable by locationUse CDN or edge locations when possible
Server loadMinimal (auto-scaling)No action needed

The executionTimeMs metric:

  • Reflects server-side processing time only (excludes network time)
  • Useful for monitoring API performance trends
  • Typically ranges from 7,000ms to 12,000ms

Optimization tip

To minimize total request time, compress and resize images on your end before base64 encoding. A 1920x1080 JPEG at 85% quality provides excellent results while keeping payload size under 500KB.

Quota & Billing

  • Each request counts toward your monthly quota, regardless of success or failure
  • Multiple vehicle matches may be returned when confidence is distributed across similar models
  • The API processes both images simultaneously for maximum accuracy