Perform damage detection

Send the images of your vehicle for damage detection

The vehicle assessment API is designed to perform damage detection using the images of vehicles. This is achieved by a trained ML model.

Prerequisite

Before you start damage assessment, please ensure you have registered your webhook credentials in your account. The results of the assessment will be sent to you via a webhook. Please refer to this this guide if you have not setup your webhook already.

How it works

Step 1: Capture images

Capture clear images of your vehicle. These images should show the four sides (right, left, front and rear) of the vehicle.

Step 2: Send Images to the assessment API

Send the images to the vehicle assessment API. Upon a successful request, you will get an object containing the ID of the assessment and a status message. The API reference and playgroung can be found here. The assessment result will be sent via a webhook.

A sample request and response is shown below:

curl --request POST \
     --url https://api.sandbox.autoinsure.curacel.co/api/v1/vehicle-assessments \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <TOKEN>' \
     --header 'content-type: application/json' \
     --data '
{
  "images": [
    {
      "url": "https://s3.amazonaws.com/vapor.autoclaims/eval_uploads/CODiQpIO8DJrkb4xINXIilZkERlgteDk6rzPRNgU.jpg",
      "part": "left"
    },
    {
      "url": "https://s3.amazonaws.com/vapor.autoclaims/eval_uploads/CODiQpIO8DJrkb4xINXIilZkERlgteDk6rzPRNgU.jpg",
      "part": "right"
    },
    {
      "url": "https://s3.amazonaws.com/vapor.autoclaims/eval_uploads/CODiQpIO8DJrkb4xINXIilZkERlgteDk6rzPRNgU.jpg",
      "part": "rear"
    },
    {
      "url": "https://s3.amazonaws.com/vapor.autoclaims/eval_uploads/CODiQpIO8DJrkb4xINXIilZkERlgteDk6rzPRNgU.jpg",
      "part": "front"
    }
  ]
}
'
{
  "id": 19,
  "info": "Processing images. Result will be sent via webhooks"
}

Step 3: Receive Webhook

As already stated, the result of the assessment will be sent via the vehicle_assessments.createdwebhook event. A sample of this event payload is shown below:

{
  "event": "vehicle_assessments.created",
  "data": {
    "id": 18,
    "images": [
      {
        "id": 8,
        "vehicle_part": "front",
        "path": "http://auto-api.test/storage/assessments/GjLXcUkyCS65a1475fcf785.jpg",
        "processing_status": "approved",
        "url": "http://auto-api.test/storage/assessments/GjLXcUkyCS65a1475fcf785.jpg",
        "created_at": "2024-01-12T14:06:23.000000Z",
        "updated_at": "2024-01-16T04:52:47.000000Z",
        "annotated_url": "http://auto-api.test/storage/annotated_image/S6mQTqtK8krHClNu65a60b9f4bfbc.jpg",
        "annotations": [
          {
            "id": 44,
            "part": "Bonnet",
            "type": "Crack",
            "severity": "High"
          }
        ]
      },
      {
        "id": 9,
        "vehicle_part": "left",
        "path": "http://auto-api.test/storage/assessments/ZFTSPDIhB465a14762175a6.jpg",
        "processing_status": "approved",
        "url": "http://auto-api.test/storage/assessments/ZFTSPDIhB465a14762175a6.jpg",
        "created_at": "2024-01-12T14:06:26.000000Z",
        "updated_at": "2024-01-16T04:52:47.000000Z",
        "annotated_url": "http://auto-api.test/storage/annotated_image/c5sBoziXSgJhilcI65a60b9f6f75b.jpg",
        "annotations": [
          {
            "id": 45,
            "part": "Bumper End",
            "type": "Dent",
            "severity": "Medium"
          }
        ]
      },
      {
        "id": 10,
        "vehicle_part": "right",
        "path": "http://auto-api.test/storage/assessments/vnxoALtucV65a147636afe5.jpg",
        "processing_status": "approved",
        "url": "http://auto-api.test/storage/assessments/vnxoALtucV65a147636afe5.jpg",
        "created_at": "2024-01-12T14:06:27.000000Z",
        "updated_at": "2024-01-16T04:52:47.000000Z",
        "annotated_url": "http://auto-api.test/storage/annotated_image/SH3d79TkcY5ms0nm65a60b9f74478.jpg",
        "annotations": []
      },
      {
        "id": 11,
        "vehicle_part": "rear",
        "path": "http://auto-api.test/storage/assessments/bfyFJbFvsU65a14764dc754.jpg",
        "processing_status": "approved",
        "url": "http://auto-api.test/storage/assessments/bfyFJbFvsU65a14764dc754.jpg",
        "created_at": "2024-01-12T14:06:28.000000Z",
        "updated_at": "2024-01-16T04:52:47.000000Z",
        "annotated_url": "http://auto-api.test/storage/annotated_image/sGEgwre4hC2wexDq65a60b9f79c84.jpg",
        "annotations": []
      }
    ]
  }
}

To see the annotated images, use the annotated_url link of the image.