AI Damage Inspection API Quickstart: From Photo to Grade in 5 Minutes

To go from a vehicle photo to a graded damage verdict: create a sandbox account and copy a vai_ API key, POST the image plus a damage policy ID to /api/v1/verify with an X-API-Key header, and read the structured verification object that comes back — is_compliant, a confidence score, an outcome category, the violation reasons behind it, and an AIAG / K1–K5 damage grade. Two optional steps finish the loop: a before/after delta that isolates new damage from pre-existing wear, and an exported PDF condition report.

That's the whole walkthrough in one paragraph. The rest of this page is the same five steps with the request and response shapes filled in. If you've read what a photo verification API is and want to actually wire one up, start here.

In brief

  • Auth is a single X-API-Key header carrying a vai_ key. There is no OAuth dance and no SDK requirement — curl is enough to test the endpoint.
  • One endpoint does the work: POST /api/v1/verify, taking an image and a policy ID.
  • Images can be multipart (best for live camera capture) or base64 JSON; JPEG, PNG, or WebP, up to 10 MB.
  • The response is a decision, not a description: branch on is_compliant or on the violation_reasons array.
  • Retries are safe if you send an Idempotency-Key — an identical retry returns the cached response instead of billing twice.
  • The sandbox is $5 of credit with no card, for evaluating the single-photo API.

A note on positioning: VerifyAI leads with parking compliance, and vehicle damage inspection is a secondary capability — but the API surface is the same, so this walkthrough applies to any policy.

Vehicle appraisal pricing: $2.00 per completed appraisal, including up to 16 original photos and detailed damage analysis. Single-photo API checks are a separate product and do not include the appraisal workflow. See the offer and arrange production access.

Step 1 — Get an API key

You get a key by creating a sandbox account; the key is issued in the dashboard and needs no approval step. The sandbox comes with $5 in credit and no credit card — use it to evaluate individual API checks. Export it so the examples below work:

bash
export VERIFY_API_KEY="vai_..."

Keys are managed from the dashboard and rotate independently — see authentication and the API keys reference for scoping and rotation.

Step 2 — Send a photo to the verify endpoint

A damage inspection is one POST to /api/v1/verify carrying two things: the image and a reference to the damage policy that defines what counts as damage. Here's a base64 example:

bash
curl https://verify.switchlabs.dev/api/v1/verify \
  -H "X-API-Key: $VERIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "policy": "vehicle-damage-inspection-policy",
    "image": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
  }'

For a live camera capture from a mobile app, send multipart/form-data with the file instead of base64 — it avoids the roughly one-third size inflation base64 adds.

FieldWhereRequiredWhat it is
X-API-KeyHeaderYesYour vai_ key. This is the only auth header the endpoint reads.
Content-TypeHeaderYesmultipart/form-data or application/json.
Idempotency-KeyHeaderNoOpaque string. An identical retry returns the cached response.
imageBodyYesFile or base64 string. JPEG, PNG, or WebP, up to 10 MB. A data: prefix is stripped for you.
policyBodyYesThe policy ID to evaluate against — built-in or one of your own.
metadataBodyNoFree-form key/values persisted with the verification (vehicle ID, rental ID, GPS).
include_image_dataBodyNoReturns the base64 image in the response for audit capture. Defaults to false.

The policy is policy-as-code — an editable ruleset of criteria like "no body damage," "no broken glass," "no missing parts," and "vehicle clearly in frame," each with a severity. Start from the built-in damage policy or a template and tune it to your SOP; the custom policies guide covers authoring your own. The full request/response contract is in the verify endpoint reference.

Step 3 — Read the structured response

The response is a machine-readable verdict your code branches on — there is no human review step and nothing to poll:

json
{
  "id": "ver_8x92m4k9",
  "status": "success",
  "is_compliant": false,
  "confidence": 0.94,
  "policy": "vehicle-damage-inspection-policy",
  "category": "damage_detected",
  "violation_reasons": ["body_damage"],
  "feedback": "Dent on rear driver door.",
  "grade": "K3"
}
FieldTypeWhat to do with it
idstringVerification ID, prefix ver_. Store it — it's your handle for the audit log.
statusstringsuccess if the verification ran, error if processing failed.
is_compliantbooleanThe top-level pass/fail. This is the field most integrations branch on.
confidencenumber0–1 score. Route the low end to human review rather than auto-charging.
categorystringOutcome bucket for the matched result.
violation_reasonsstring[]Machine-readable IDs, one per failed criterion — use these to drive workflow, not the prose.
feedbackstringHuman-readable explanation, safe to show an end user.
gradestringSeverity on the AIAG / K1–K5 scale.

Your code reads is_compliant (or the failed violation_reasons) and decides what to do — flag the vehicle, open a damage record, or pass it through. If you're new to the grades, the AIAG & K1–K5 explainer and the glossary entry break them down. How verifications work documents the object in full.

When a call fails

Every failure is an HTTP status you can branch on, and each one has exactly one sensible response:

StatusReasonWhat to do
400Missing fields, invalid JSON, image too large, unknown policy IDFix the request. Retrying unchanged will fail again.
401Missing or invalid API keyCheck the X-API-Key header and the key's state.
403Key not valid for VerifyAI, or no active subscriptionCheck the account, not the code.
409A request with the same Idempotency-Key is still in flightWait and re-read; do not issue a new key.
422Idempotency-Key reused with a different bodyGenerate a fresh key for the new payload.
429Rate limit or monthly usage capBack off using the Retry-After header — see rate limits.
500Verification processing failedRetry with the same idempotency key.
503Authentication service unavailableRetry — see handling retries.

Every response also carries an X-Request-Id; log it, because it's the first thing support will ask for.

Step 4 — Compute a before/after delta for returns

A before/after delta is what separates new damage from wear that was already there: you capture a baseline at check-out and a second set at return, and the API compares them. That comparison, not the return photo alone, is the persuasive part of a damage dispute.

Capture a baseline at check-out and a second photo at return, and request a before/after delta — the API isolates new damage from pre-existing wear, so you're not arguing about a scratch that was always there. The glossary entry defines the term, and rental return verification shows where it sits in the workflow.

Step 5 — Export a PDF condition report

A PDF condition report packages the baseline, the delta, and the grade into one document you can attach to a chargeback response or hand to a customer. It's a single call — no template work on your side.

For a representment or a customer-facing record, see the PDF condition reports guide, and chargeback defense for assembling the surrounding evidence package.

Capture without slowing the counter

You don't have to staff the inspection. Self-inspection links let the renter photograph the vehicle from their own phone, producing a customer-acknowledged baseline — see self-inspection links for how that flow works alongside the API.

Next steps

That's the full loop: key → verify → read grade → delta → PDF. From here:

On compliance claims

VerifyAI is GDPR-aligned, with a SOC 2 audit in progress — not yet SOC 2 certified. See security and GDPR for the current status.

Get your API key and grade your first photo free — $5 sandbox credit, no card required.

Get in Touch

Questions about pricing, integrations, or custom deployments? We'd love to hear from you.