Create a report
POST /v1/analyses starts a Vehicle Asset Report from photos. (The path says analyses; each one is a report.)
Request fields
images(required): 1 to 32 photos, each{ "url": "https://..." }or{ "data": "<base64>", "media_type": "image/jpeg" }. The first 24 are analyzed, and the result warns when more were sent.vehicle:vin,year,make,model,trim,market(2 or 3 letters, such asMX) andoptions(a list of strings). All optional.notes: up to 2,000 characters of context, such as "rear bumper replaced last year".reference: your own id, up to 200 characters, echoed back in the result.features: result features you need, such as["tires"]. With nopipeline, the default runs when it has them, and otherwise a pipeline that does. See Features.pipeline: a pipeline id to pin, such asX6. Without it your account's default runs, else the platform's (X6today). Asking for a feature the pinned pipeline doesn't return answers400.interiors:skipordetect, for pipelines withphoto_types.skipleaves photos clearly sorted as interior, document or not a vehicle out of damage detection; borderline photos are always checked.
curl -X POST "https://nextauto.ai/v1/analyses?wait=true" \
-H "Authorization: Bearer $NEXTGRADE_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: your-own-id-123" \
-d '{
"images": [{ "url": "https://example.com/front.jpg" }, { "url": "https://example.com/left.jpg" }],
"vehicle": { "vin": "5XYPG4A32JG427430", "trim": "LX", "market": "MX" },
"notes": "Rear bumper replaced last year",
"reference": "your-own-id-123",
"features": ["tires"]
}'Answers
202: started. The body has theanalysis_idandstatus; theLocationandx-analysis-idheaders point to it.- With
?wait=truethe call waits for the report, up to about 4.5 minutes:200when completed,422when the report failed, and202if it is still running. 400: the body is invalid (issueslists each problem), or the pinned pipeline lacks a requested feature.- Limits:
429and402, see Usage and limits.
Fetch a report
GET /v1/analyses/{id} returns the status (queued, processing, completed, failed), the current stage while it runs (loading_photos, finding_damage or writing_report), and the full result once completed. Only the account that created a report can read it; any other id answers 404.
For many reports, register a webhook instead of polling. If you poll, wait about 10 seconds between calls.
List reports
GET /v1/analyses lists your reports, newest first, with each one's analysis_id, status, created_at, reference, vehicle and damage_count. Use limit (1 to 100, default 20) and status to narrow it. When there are more, next_before is set: pass it as before for the next page.
Safe retries
Send an Idempotency-Key header with any unique string. Repeating the request with the same key returns the same report instead of starting, and paying for, a new one.