Reference
Car Side Recognition
Identify vehicle side or orientation from an image.
This page shows how to use the VehiCore Car Side Recognition API to detect which side of a vehicle is shown in an image. Request is multipart/form-data with a single image; authenticate with X-API-Key.
Recognize Side
POST /api/car-side-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). |
Example request
curl -X POST "https://vehicore-api.dev-stage.fyi/api/car-side-recognition" \
-H "X-API-Key: YOUR_API_KEY" \
-F "image=@/path/to/vehicle.jpg"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');
const response = await fetch('https://vehicore-api.dev-stage.fyi/api/car-side-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://vehicore-api.dev-stage.fyi/api/car-side-recognition"
headers = {"X-API-Key": os.environ["VEHICORE_API_KEY"]}
files = {"image": open("/path/to/vehicle.jpg", "rb")}
response = requests.post(url, headers=headers, files=files)
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")))
.build();
Request request = new Request.Builder()
.url("https://vehicore-api.dev-stage.fyi/api/car-side-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.Close()
req, _ := http.NewRequest("POST", "https://vehicore-api.dev-stage.fyi/api/car-side-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 the detected side/orientation. 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. |