---
name: nextgrade-vehicle-asset-reports
description: Add NeXT Grade Vehicle Asset Reports to an app. Use when code needs to send photos of a vehicle to the NeXT Grade API and read back the itemized damage list (damaged parts, severity, suggested repair, photo evidence), or handle its webhooks.
---

# NeXT Grade Vehicle Asset Reports

NeXT Grade turns photos of one vehicle into a Vehicle Asset Report. Base URL: https://nextauto.ai. Full docs: https://nextauto.ai/llms.txt. OpenAPI: https://nextauto.ai/openapi.json.

## Before you start

- The person you work for needs an approved NeXT Grade account and an API key from https://nextauto.ai/keys. You can't create either for them. If there is no key yet, tell them where to get it and stop.
- Read the key from the `NEXTGRADE_KEY` environment variable (or the app's secrets manager). Never print it, log it, commit it or put it in client-side code. Call the API only from a server.

## Steps

1. Collect photos of the vehicle from every side (the first 24 are analyzed) as https URLs (or base64 with `media_type`). Add the VIN and any known year, make, model, trim and market; they improve accuracy.
2. Create the report: `POST https://nextauto.ai/v1/analyses` with `Authorization: Bearer <key>`, a JSON body `{ "images": [{ "url": "..." }], "vehicle": { "vin": "..." }, "reference": "<your id>" }`, and an `Idempotency-Key` header set to the same id so a retry never starts a second, billed report.
3. Get the result one of three ways:
   - Short scripts: add `?wait=true`; the call returns when done (up to about 4.5 minutes).
   - Apps: store the `analysis_id`, then `GET https://nextauto.ai/v1/analyses/{id}` every 10 seconds or so until `status` is `completed` or `failed`.
   - At scale: register a webhook once (`POST /v1/webhooks`), store its secret, and verify `nextgrade-signature` on every delivery (HMAC-SHA256 of `t + "." + body`; reject old timestamps). See https://nextauto.ai/docs/webhooks.md.
4. Read the report:
   - `damages[]`: one line per damaged part with `severity`, the suggested action, `review` status and photo `evidence`.
   - `coverage`: views captured and parts never seen. Never treat a part that wasn't seen as undamaged.
   - `summary`: counts and lines needing review.
   - `features` lists what this report includes; a missing field means not returned, not "nothing found". Ignore unknown fields.
5. Show lines marked for review to a person. Reports support lending, insurance and purchase decisions; they don't make them.

## Errors

- `401` bad or missing key; `403` account not approved or paused: tell the person, don't retry.
- `400` fix the fields in `issues`. `422` the report failed: check that the photos load and show a vehicle.
- `429` rate or daily limit, `402` monthly limit: back off; don't loop.
- `500`: retry later with the same `Idempotency-Key`.

## Grading a vehicle without writing code

If the person wants a report now rather than an integration, and your client supports MCP, connect the NeXT Grade MCP server (https://nextauto.ai/mcp, same API key as a Bearer token) and use its create_vehicle_report tool. Setup for each client: https://nextauto.ai/docs/mcp.md.

## Not available yet

OBD2 engine data, vehicle history, part numbers and repair cost are not in the API yet. Don't build against them.

## Reference

- Request fields: https://nextauto.ai/docs/reports.md
- Every result field: https://nextauto.ai/docs/results.md
- Features: https://nextauto.ai/docs/features.md
- Errors: https://nextauto.ai/docs/errors.md
- List reports: `GET https://nextauto.ai/v1/analyses` (see https://nextauto.ai/docs/reports.md)
- MCP server: https://nextauto.ai/docs/mcp.md
