Reference
Damage Recognition
Detect and assess vehicle damage from images.
How it works: You send an image and your X-API-Key. The service uses AI (vision) to analyze damage; the vehicle side/view is inferred from the image. No path parameter is required.
This page shows how to use the VehiCore Damage Recognition API to analyze vehicle images for damage. Request is multipart/form-data; authenticate with X-API-Key. To get a key, register and purchase at vehicore.pro/api-keys.
Recognize Damage
POST /api/damage-recognition
Request
Headers
| Field | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes | Your API key. |
Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
image | file | Yes | Vehicle image. |
userLanguage | string | No | Language code (e.g. en-US). |
Example request
curl -X POST "https://api.vehicore.pro/api/damage-recognition" \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@/path/to/vehicle.jpg" \
-F "userLanguage=en-US"import fs from 'node:fs';
const formData = new FormData();
const buf = fs.readFileSync('/path/to/vehicle.jpg');
formData.append('image', new Blob([buf], { type: 'image/jpeg' }), 'vehicle.jpg');
formData.append('userLanguage', 'en-US');
const response = await fetch('https://api.vehicore.pro/api/damage-recognition', {
method: 'POST',
headers: { 'X-API-Key': process.env.VEHICORE_API_KEY },
body: formData,
});
const data = await response.json();import os
import requests
url = "https://api.vehicore.pro/api/damage-recognition"
headers = {"X-API-Key": os.environ["VEHICORE_API_KEY"]}
files = {"image": open("/path/to/vehicle.jpg", "rb")}
data = {"userLanguage": "en-US"}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("image", "vehicle.jpg",
RequestBody.create(new File("/path/to/vehicle.jpg"), MediaType.parse("image/jpeg")))
.addFormDataPart("userLanguage", "en-US")
.build();
Request request = new Request.Builder()
.url("https://api.vehicore.pro/api/damage-recognition")
.header("X-API-Key", System.getenv("VEHICORE_API_KEY"))
.post(body)
.build();
try (Response response = new OkHttpClient().newCall(request).execute()) {
System.out.println(response.body().string());
}body := &bytes.Buffer{}
w := multipart.NewWriter(body)
f, _ := os.Open("/path/to/vehicle.jpg")
part, _ := w.CreateFormFile("image", "vehicle.jpg")
io.Copy(part, f)
f.Close()
w.WriteField("userLanguage", "en-US")
w.Close()
req, _ := http.NewRequest("POST", "https://api.vehicore.pro/api/damage-recognition", body)
req.Header.Set("X-API-Key", os.Getenv("VEHICORE_API_KEY"))
req.Header.Set("Content-Type", w.FormDataContentType())
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
io.Copy(os.Stdout, resp.Body)Response
On success the API returns structured damage information. See Swagger for the full response schema.
Possible errors
All error responses use the shape { "message": "Human-readable text", "code": "OPTIONAL_CODE" }. See Error responses for details.
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Bad Request — invalid or missing image, or other validation failure. |
| 401 | UNAUTHORIZED | Unauthorized — missing or invalid X-API-Key. |
| 402 | INSUFFICIENT_CREDITS | Payment Required — insufficient credits. Purchase more from Billing. |
| 500 | — | Internal Server Error — unexpected server error; retry later. |