CarMetadataGet a free key

Quickstart

Send a car photo, get back the brand, model and generation. This takes about five minutes and needs no credit card.

1. Get a key

Sign in with your email. A new address gets an account with 200 free calls on the Generation tier with every add-on. Open the dashboard, create an API key and copy it right away: it is shown once and we do not store it.

Keys look like cm_live_… and go in the Authorization header. See Authentication.

2. Make a call

The endpoint is POST https://api.carmetadata.com/v1/identify. The photo goes in a multipart field named file, up to 10 MB. Add ?addons=plates to also get a box around every licence plate.

Declare the file as image/jpeg, image/png or image/webp, matching its bytes; the samples below set it explicitly, which also matters for WebP files. The photo must be a JPEG, PNG or WebP, at most 10 MB, with each side between 32 and 10,000 pixels and at most 50 megapixels. iPhone HEIC photos must be converted to JPEG first.

curl

curl -X POST "https://api.carmetadata.com/v1/identify?addons=plates" \
  -H "Authorization: Bearer cm_live_YOUR_KEY" \
  -F "file=@car.jpg;type=image/jpeg"

Python

import requests

with open("car.jpg", "rb") as f:
    res = requests.post(
        "https://api.carmetadata.com/v1/identify",
        params={"addons": "plates"},
        headers={"Authorization": "Bearer cm_live_YOUR_KEY"},
        files={"file": ("car.jpg", f, "image/jpeg")},
        timeout=40,
    )

res.raise_for_status()
print(res.json()["identity"])

JavaScript

This runs on Node 20 or later and in browsers. In a browser, never ship your key: call the API from your server.

import { readFile } from "node:fs/promises";

const form = new FormData();
form.append("file", new Blob([await readFile("car.jpg")], { type: "image/jpeg" }), "car.jpg");

const res = await fetch("https://api.carmetadata.com/v1/identify?addons=plates", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.CARMETADATA_KEY}` },
  body: form,
});

if (!res.ok) throw new Error(JSON.stringify(await res.json()));
console.log((await res.json()).identity);

3. Read the answer

{
  "request_id": "d8d5aad1-6c1e-4b0a-9f3e-2a7c5b8e4d10",
  "no_car": false,
  "view": "exterior",
  "identity": {
    "level": "generation",
    "top50": false,
    "brand": { "name": "bmw", "confidence": 0.9244 },
    "model": { "name": "3 Series", "confidence": 0.9148 },
    "generation": { "name": "G20/G21", "start_year": 2019, "end_year": null, "confidence": 0.7843 }
  },
  "detection": {
    "license_plates": [
      { "bbox": [0.1763, 0.4377, 0.3073, 0.5466], "confidence": 0.9511, "also": [] }
    ]
  }
}

Two things to know before you rely on it:

  • identity.level is the deepest level the answer is confident at: generation, model, brand or none. Fields below that level are still returned on plans that include them, but as best guesses. Check level before you trust a model or generation.
  • no_car is true when there is no car in the photo. It counts as a call.

Everything else is in Response fields.

Next steps

The service has no SLA and must not be used for critical decisions. See the notice at the bottom of this page.

No SLA: the service has no uptime or availability guarantee and no service credits. It is provided as is and may change, pause or stop at any time. Do not use it for critical decisions.